You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Nov 12, 2024. It is now read-only.
I'm using motion one with Solid and trying to create an animation that does NOT animate when initially mounted but animates from its current transform whenever props are updated.
If I set initial to false it doesn't animate to its initial transform but all subsequent updates start from the initial transform. E.g. if I start with x={100}, y={100} and then animate to x={200}, y={200} it will immediately appear at x={100}, y={100} and then animate to x={200}, y={200} but then if I update to x={300}, y={300} it will snap to x={100}, y={100} before starting the animation, but ideally I'd like it to start from whatever its current transform is.
If I set initial to undefined it animates to its initial position (which I don't want) but all subsequent animations start from the current state of the animation (which I do want).
Is there a way to prevent initial animations but not reset the state of the animation every time it restarts?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I'm using motion one with Solid and trying to create an animation that does NOT animate when initially mounted but animates from its current transform whenever props are updated.
If I set
initial
tofalse
it doesn't animate to its initial transform but all subsequent updates start from the initial transform. E.g. if I start withx={100}, y={100}
and then animate tox={200}, y={200}
it will immediately appear atx={100}, y={100}
and then animate tox={200}, y={200}
but then if I update tox={300}, y={300}
it will snap tox={100}, y={100}
before starting the animation, but ideally I'd like it to start from whatever its current transform is.If I set
initial
toundefined
it animates to its initial position (which I don't want) but all subsequent animations start from the current state of the animation (which I do want).Is there a way to prevent initial animations but not reset the state of the animation every time it restarts?
Beta Was this translation helpful? Give feedback.
All reactions