Share Posted August 2, 2020 Hi everyone, Thanks again for the amazing tools, I am a long term user now and still amazed everyday by the gsap platform ♥️ I am trying to completely stop the dragging and tweens of a Draggable instance when clicking on a button in order to move the dragged item programmatically and prevent jumps. I use the endDrag function, but when the draggable instance is configured to use inertia and snaps, it always complete the snap first no matter what. How can I be sure that every tween is stopped when using endDrag(), even the inertia related ones? I can create a codepen if it is not clear enough. Thank you for your help. Link to comment Share on other sites More sharing options...
Author Share Posted August 2, 2020 Well, I found the solution... You have to use gsap.killTweensOf(target); and that will do the trick. Here is what it could look like : draggable.endDrag(event); gsap.killTweensOf($scroller); draggable.update(); I can delete the post or just leave it for maybe future reference? Have a nice day everyone. 1 Link to comment Share on other sites More sharing options...
Share Posted August 2, 2020 I was literally JUST typing that answer, @Jean-Baptiste Janot! You beat me to it by a few seconds. Nice work And yes, let's leave the post because it may help someone else who has a similar question in the future. Thanks for being a Club GreenSock member! 🙌 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now