Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] setting speed to -1 does not reverse play #2079

Closed
sukjae opened this issue Apr 11, 2023 · 3 comments Β· Fixed by #2194
Closed

[BUG] setting speed to -1 does not reverse play #2079

sukjae opened this issue Apr 11, 2023 · 3 comments Β· Fixed by #2194
Labels
bug Something isn't working

Comments

@sukjae
Copy link

sukjae commented Apr 11, 2023

1. Read the FAQs πŸ‘‡
πŸ™†β€β™‚οΈ

2. Describe the bug

related to #2060
and #2060 (comment)

const animation = animate(".four", { x: 90 }, { duration: 2 });
animation.time = animation.duration;
animation.speed = -1;

3. Provide a CodeSandbox reproduction of the bug

Sample Code: https://codesandbox.io/s/thirsty-firefly-d0zv50?file=/src/App.js

4. Steps to reproduce

Steps to reproduce the behavior:

  1. check version of framer motion is v10.11.4
  2. press play button

5. Expected behavior

move from end position to start position

@sukjae sukjae added the bug Something isn't working label Apr 11, 2023
@sukjae
Copy link
Author

sukjae commented Apr 11, 2023

Interestingly, if you pull the playhead a little bit from the end, it'll play back

animation.time = animation.duration - 0.1;
animation.speed = -1;

@mattgperry
Copy link
Collaborator

Ah yeah it could be because setting the animation to duration itself finishes the animation.

I can take a look.

@sukjae
Copy link
Author

sukjae commented May 15, 2023

hi @mattgperry ! Is there any progress related to it? I'm looking forward to it a lot πŸ™

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants