Jump to content
GreenSock

F.D.C.H

catching draggable element mid tween breaks it.

Recommended Posts

Hello everybody, it's me again :)

im running into a little Problem.
I've got a draggable area(red slide), which also can be animated by click. 

If i click on the button und catch the Slide mid tween, the tween breaks.
I cant restart it, like its being killed from the timeline.
How can i avoid this behaviour? Thank you very much in advance!!

See the Pen oNqjLed?editors=1010 by FDCH (@FDCH) on CodePen

Link to comment
Share on other sites

Yep, by default Draggable will kill competing x/y tweens of the target to prevent problems. Otherwise, you might try to drag it while it's animating and the animation will pull it out from under you :)

 

You could greatly simplify the logic and make it work like this:

See the Pen poLjPyQ?editors=0010 by GreenSock (@GreenSock) on CodePen

Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×