Aleksei Posted December 13, 2019 Share Posted December 13, 2019 Hello, it's me again with GSAP 3 migration I have a case, when I check Draggable's endX and if it is smaller than I need I return the dragged object back to original position. In the previous version of GSAP, when I applied TweenMax.to to the dragged object it "rewrote" the Draggable's behaviour and did what I want. But now, after gsap.to finishes its animation the Draggable continues its work and places object into the endX coordinate. Please, help. I couldn't find a proper "stop" method for Inertia in the Docs. See the Pen oNgLBJX by nordskill (@nordskill) on CodePen Link to comment Share on other sites More sharing options...
OSUblake Posted December 13, 2019 Share Posted December 13, 2019 The solution is not obvious. Set overwrite to "auto". See the Pen 349eabaaf1cf99de3010a6a61003abcc by osublake (@osublake) on CodePen @GreenSock More overwrite issues. 1 Link to comment Share on other sites More sharing options...
Aleksei Posted December 13, 2019 Author Share Posted December 13, 2019 It works. Thank you, @OSUblake! By the way, I had a mistake in this line if (this.endX < 300 || this.endX > -300) { previously. There should be &&. But it's fine — the issue is still reproducible. 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