new Drag()
Methods
-
<static> bindEvent(subject, eventName, callback [, context])
-
Binds the onDragStart, onDragUpdate and onDragEnd events on Sprites and Groups
Parameters:
Name Type Argument Description subjectPhaser.Sprite | Phaser.Group The Sprite or Group
eventNamestring The event name, one of onDragStart, onDragUpdate, onDragEnd
callbackfunction Callback handler
contextObject <optional>
The callback context
-
<static> enable(subject [, clampToCenter])
-
Enables the drag feature on a Sprite (native) or a group (not implemented)
Parameters:
Name Type Argument Default Description subjectPhaser.Sprite | Phaser.Group The Sprite or Group to be dragged
clampToCenterboolean <optional>
false Clamp the item to its center while dragging