-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
overshootClamping not working as expected #225
Comments
|
@stnwk do you use oscillatoranimation or the default spring impl? In the default it updates the value before checking for overshoot, i've moved it a little bit down and now it works, will have to release, though. |
Oh shoot, good point - no I'm using the default spring implementation. What does it mean for me now? |
Should be fixed in 5.7.2 |
Hi :)
Thanks for this awesome lib!
I believe I have found an issue with the
overshootClamping
option.I have isolated the problem in this codesandbox https://codesandbox.io/s/91k1vxp7r4 (take a look at the console output).
What's the issue?
I want to animate a value imperatively going from 0 to 1000. I want it to animate smoothly, but never bounce. I thought this was achievable by using
overshootClamping
.See https://github.com/drcmda/react-spring/blob/master/API.md#spring-configs
However, as you can see in the codesandbox console output the value does exceed it's animation goal of 1000. I was not expecting this to happen.
Is this a bug? If not, what exactly is the purpose of
overshootClamping
and how would I achieve my goal?Btw: When
overshootClamping
is set to false (default) the value exceeds/overshoots the limit multiple times - so I guess it's working almost correctly except for the last animation frame?I am using
react-spring 5.7.1
Cheers,
Stefan
The text was updated successfully, but these errors were encountered: