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

Decay animation jumps at the last frame #1437

Closed
sahil87 opened this issue Apr 21, 2021 · 4 comments · Fixed by #1444
Closed

Decay animation jumps at the last frame #1437

sahil87 opened this issue Apr 21, 2021 · 4 comments · Fixed by #1444
Assignees
Labels
area: core relates to core classes // parts of the library kind: bug Something isn't working
Projects
Milestone

Comments

@sahil87
Copy link

sahil87 commented Apr 21, 2021

🐛 Bug Report

When a decay animation ends, in the last frame the value resets to "to". The decay animation isn't supposed to use "to" though.
Reference: #887 (comment)
Probably happens because of this (no decay animation check).

To Reproduce

This is a sandbox that replicates the issue.
simplescreenrecorder-2021-04-21_14 15 22

Expected behavior

No jump at the end of the decay animation

Link to repro (highly encouraged)

https://codesandbox.io/s/decay-v901-jump-cvwgi

Environment

  • react-spring v9.0.1
@joshuaellis joshuaellis added area: core relates to core classes // parts of the library template: bug This issue might be a bug v9 labels Apr 21, 2021
@joshuaellis joshuaellis added this to the v9.X.X milestone Apr 21, 2021
@joshuaellis joshuaellis added this to Needs Investigation in v9.2.0 Apr 21, 2021
@joshuaellis joshuaellis added kind: bug Something isn't working and removed template: bug This issue might be a bug labels Apr 22, 2021
@joshuaellis joshuaellis moved this from Needs Investigation to In Progress (assign yourself) in v9.2.0 Apr 22, 2021
@joshuaellis joshuaellis self-assigned this Apr 22, 2021
@joshuaellis
Copy link
Member

I'm looking at this in conjunction with #1026

@sahil87
Copy link
Author

sahil87 commented Apr 27, 2021

Looking forward to the fix.
"decay" animation fills up a large void of the animations generally needed apart from physics-based spring animation.

joshuaellis added a commit that referenced this issue Apr 27, 2021
* chore(demos): add rocket-decay demo

* fix: check if immediate has changed to true to trigger inertia

* fix: add BIC

* fix: when decay is finished anim.to is set causing jump

resolves #1437
@joshuaellis joshuaellis moved this from In Progress (assign yourself) to In review in v9.2.0 Apr 27, 2021
@joshuaellis
Copy link
Member

This has been released on 9.2.0-beta.0 if you could try it that would be great ⭐

@sahil87
Copy link
Author

sahil87 commented Apr 28, 2021

Yes, this fixes it. Thank you! 😄

@joshuaellis joshuaellis moved this from In review to DONE in v9.2.0 Apr 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core relates to core classes // parts of the library kind: bug Something isn't working
Projects
No open projects
Development

Successfully merging a pull request may close this issue.

2 participants