Helper class that plays the role of the target during a drag and drop operation that is initiated using startDrag in a DragSource.
Inheritance Hierarchy
DropTarget
Remarks
During the drag operation, the current drop target can be obtained through the QueryContinueDragEventArgs which is fired with the QueryContinueDrag event, when the drop target changes.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.DropTarget
See Also
Constructors
Initializes a new instance of the DropTarget class.
Remarks
Use the In order to make this instance available to the drag and drop mechanisms, the setDropTarget method should be used.
See Also
Properties
The element that is registered for this drop target.
Remarks
If this drop target holds a CanvasComponent, getComponent can be used to retrieve the actual CanvasComponent.
Events
Occurs when a drag enters the drop target.
Remarks
The handler may adjust the dropEffect and call handled.
Event Registration
addDragEnterListener(function(this, DragEventArgs):void)
Event Deregistration
removeDragEnterListener(function(this, DragEventArgs):void)
Signature Details
function(sender: this, evt: DragEventArgs)
Represents the method that will handle an event when the event provides data.
Parameters
- sender - this
- The source of the event.
- evt - DragEventArgs
- An object that contains the event data.
Occurs when a drag leaves the drop target.
Remarks
The handler may adjust the dropEffect and call handled.
Event Registration
addDragLeaveListener(function(this, DragEventArgs):void)
Event Deregistration
removeDragLeaveListener(function(this, DragEventArgs):void)
Signature Details
function(sender: this, evt: DragEventArgs)
Represents the method that will handle an event when the event provides data.
Parameters
- sender - this
- The source of the event.
- evt - DragEventArgs
- An object that contains the event data.
Occurs when a drag is being performed over the drop target.
Remarks
The handler may adjust the dropEffect and call handled.
Event Registration
addDragOverListener(function(this, DragEventArgs):void)
Event Deregistration
removeDragOverListener(function(this, DragEventArgs):void)
Signature Details
function(sender: this, evt: DragEventArgs)
Represents the method that will handle an event when the event provides data.
Parameters
- sender - this
- The source of the event.
- evt - DragEventArgs
- An object that contains the event data.
Occurs when the drop operation is performed on the drop target.
Remarks
The handler may adjust the dropEffect and call handled.
Event Registration
addDropListener(function(this, DragEventArgs):void)
Event Deregistration
removeDropListener(function(this, DragEventArgs):void)
Signature Details
function(sender: this, evt: DragEventArgs)
Represents the method that will handle an event when the event provides data.
Parameters
- sender - this
- The source of the event.
- evt - DragEventArgs
- An object that contains the event data.
Static Methods
Gets the DropTarget instance associated with the given element.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- element - Element
- The element to get the drop target instance of.
Returns
- ↪DropTarget
- The associated instance or
null
.
See Also
Sets the drop target for the given element.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- element - Element
- The element to register the drop target instance with.
- dropTarget - DropTarget
- The instance to attach to the element or
null
to remove the association from the element.