Enable drag and drop of the entity.
public this .dragDirection()
Remove any previously specified direction.
public this .dragDirection(vector)
public this .dragDirection(degree)
Specify the dragging direction.
this.dragDirection()
this.dragDirection({x:1, y:0}) //Horizontal
this.dragDirection({x:0, y:1}) //Vertical
// Note: because of the orientation of x and y axis,
// this is 45 degree clockwise with respect to the x axis.
this.dragDirection({x:1, y:1}) //45 degree.
this.dragDirection(60) //60 degree.
Internal method for starting a drag of an entity either programatically or via Mouse click
public this .stopDrag(void)
Stop the entity from dragging. Essentially reproducing the drop.
public this .startDrag(void)
Make the entity follow the mouse positions.
public this .enableDrag(void)
Rebind the mouse events. Use if .disableDrag
has been called.
public this .disableDrag(void)
Stops entity from being draggable. Reenable with .enableDrag()
.