Skip to content

Commit

Permalink
front: prevent animation after switching simulation and clearing a vi…
Browse files Browse the repository at this point in the history
…a input

Signed-off-by: nncluzu <[email protected]>
  • Loading branch information
kmer2016 committed Feb 10, 2025
1 parent 2134be1 commit 3b7c890
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,12 @@ const StdcmVias = ({ disabled = false, skipAnimation, onItineraryChange }: Stdcm
if (!pathStep.isVia) return null;
const pathStepIndex = index + 1;
return (
<div className={cx('stdcm-vias-bundle', { animated: !skipAnimation })} key={pathStep.id}>
<div
className={cx('stdcm-vias-bundle', {
animated: pathStepIndex === newIntermediateOpIndex && !skipAnimation,
})}
key={pathStep.id}
>
<StdcmDefaultCard
hasTip
text={t('trainPath.addVia')}
Expand Down
1 change: 0 additions & 1 deletion front/src/styles/scss/applications/stdcm/_home.scss
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@
}

.stdcm-vias-bundle {

&.animated {
animation: bouncin-in 0.75s cubic-bezier(0.567, -0.475, 0, 1);
}
Expand Down

0 comments on commit 3b7c890

Please sign in to comment.