Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
potatoDie

Draggable sync fails

Recommended Posts

Hello GreenSocks,

 

I cannot get syncing / resetting a draggable to work. Please, see my pen.

 

The red dot is a (Draggable) slider. When user changes number of control points, I remove the transform on the target and call Draggable.update(). But unfortunately, the x property remains the same.

 

Would be great if you could have a look at it!

 

Roelof

potatoDie

See the Pen WbOWGY by potatoDie (@potatoDie) on CodePen

Link to comment
Share on other sites

Hi potatoDie  :)

 

pls provide a reduced Codepen demo for next time  , 

use this to set x:0 : TweenMax.set(sprite,{x:0}); , it's always best to set draggable element's x/y directly through GSAP 

 

check this out : 

See the Pen emEVWg by MAW (@MAW) on CodePen

 

and pls check this post too : 

 

http://greensock.com/forums/topic/11158-draggable-update-not-working/

  • Like 3
Link to comment
Share on other sites

Thank you Diaco for the prompt reply. Sorry for the overload of context.

 

Well, you solved it! Great :) I never thought of using TweenMax, since I wasn't tweening. I'll need to have a closer look on what TweenMax actually is.

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.
×