the Draggable instance itself (to make chaining possible)
GreenSock Docs (HTML5/JS)
Back to Utilities
Updates the Draggable's x/y properties to reflect the target element's current position.
true, the Draggable’s
applyBounds() method will be called as well so that bounds are enforced (this takes more processing, though).
true, the coordinates will be updated so that the Draggable "sticks" to the pointer which can be very helpful when reparenting an element. Otherwise, the element's positioning would naturally change when being nested into a different element.
Returns : Draggable
Updates the Draggable's
y properties to reflect the target element's current position. This can be useful if, for example, you manually change or tween the element's position, but then you want to make sure the Draggable's
y reflect those changes. You could even point a tween's
onUpdate to the Draggable's
update method to ensure things are synchronized throughout a tween. Setting
true can be helpful if you're re-parenting the target because it acts like it "sticks" to the pointer (otherwise, reparenting would naturally cause the position to change).