Closed i-am-the-slime closed 3 years ago
yep experiencing the same behaviour!
@i-am-the-slime could you provide a video or some other type of reproduction of this behaviour? Is this happening on desktop or on mobile?
I have hunch that this jankiness is caused by the fact that the animation is driven by two different motion values: one for the dragging and one for the spring animation after the dragging has ended (the jank probably occurs right at the moment we switch between these two motion values).
I need to investigate if Framer Motion v4 has a better way to switch between linear and spring animation without having to create two separate motion values 🤔 🕵🏻
I think I figured it out. It's possible to use a single motion value and do the spring animations by using Framer Motion's animate
helper:
animate(y, snapTo, { type: 'spring', ...springConfig });
This change is now available in v1.3.2
🚀
Hopefully it fixes your issue 🙂
Hello there! Thanks for the library. I found that when dragging the sheet higher than its breakpoint at moderate speeds it janks back to a lower position and then animates to the top instead of animating down from the top.