Jump to content
GreenSock

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

Draggable

.endDrag()

.endDrag( event:Object ) : void

You may force the Draggable to immediately stop interactively dragging by calling endDrag() and passing it the original mouse or touch event that initiated the stop - this is necessary because Draggable must inspect that event for various information like pageX, pageY, target, etc.

Parameters

event: Object

a mouse or touch event

Details

You may force the Draggable to immediately stop interactively dragging by calling endDrag() and passing it the original mouse or touch event that initiated the stop - this is necessary because Draggable must inspect that event for various information like pageX, pageY, target, etc. You cannot callendDrag() without passing that original event.

endDrag() is different than disable() in that disable() completely shuts down the Draggable instance so that the user cannot initiate dragging anymore whereas endDrag() simply stops a drag-in-progress, acting like the user released their mouse/touch.

Copyright 2017, GreenSock. All rights reserved. This work is subject to theterms of useor for Club GreenSock members, the software agreement that was issued with the membership.
×