DragDropManager
public class
feathers.dragDrop.DragDropManager
Description
Handles drag and drop operations based on Starling touch events.
See also:
feathers.dragDrop.IDragSource
feathers.dragDrop.IDropTarget
feathers.dragDrop.DragData
API overview
Constructor
Attributes
Public attributes
| dragData: DragData |
static
read-only
The data associated with the current drag |
| dragSource: IDragSource |
static
read-only
The |
| isDragging: Boolean |
static
read-only
Determines if the drag and drop manager is currently handling a drag |
| touchPointID: Number |
static
read-only
The ID of the touch that initiated the current drag |
Functions
Public functions
| acceptDrag ( target: IDropTarget ): Void |
static Tells the drag and drop manager if the target will accept the current drop |
| cancelDrag (): Void |
static Immediately cancels the current drag |
| startDrag ( source: IDragSource , touch: Touch , data: DragData , dragAvatar: DisplayObject = null , dragAvatarOffsetX: Number = 0 , dragAvatarOffsetY: Number = 0 ): Void |
static Starts a new drag |
Constructor
DragDropManager ()
Attributes
dragData: DragData
static read-only
The data associated with the current drag. Returns null
if there is not a current drag.
isDragging: Boolean
static read-only
Determines if the drag and drop manager is currently handling a drag. Only one drag may be active at a time.
touchPointID: Number
static read-only
The ID of the touch that initiated the current drag. Returns -1
if there is not an active drag action. In multi-touch applications,
knowing the touch ID is useful if additional actions need to happen
using the same touch.
Functions
acceptDrag ( target: IDropTarget ): Void
static
Tells the drag and drop manager if the target will accept the current
drop. Meant to be called in a listener for the target's
DragDropEvent.DRAG_ENTER event.
Parameters
| target: IDropTarget |
getFullTypeName
(): String
Inherited from Object
native
Gets the fully qualified type name of the Object. The fully qualified type name includes the package of the type.
Returns
| String | fully qualified type name of the Object. |
getType
(): Type
Inherited from Object
native
Gets the Type that describes the Object.
Returns
| Type | The Type that describes the object. |
getTypeName
(): String
Inherited from Object
native
Gets the type name of the Object.
Returns
| String | type name of the Object. |
startDrag ( source: IDragSource , touch: Touch , data: DragData , dragAvatar: DisplayObject = null , dragAvatarOffsetX: Number = 0 , dragAvatarOffsetY: Number = 0 ): Void
static
Starts a new drag. If another drag is currently active, it is immediately cancelled. Includes an optional "avatar", a visual representation of the data that is being dragged.
Parameters
| source: IDragSource | |
| touch: Touch | |
| data: DragData | |
| dragAvatar: DisplayObject = null | |
| dragAvatarOffsetX: Number = 0 | |
| dragAvatarOffsetY: Number = 0 |