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 query-continue-drag event, when the drop target changes.
Type Details
- yFiles module
- view
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.
Occurs when a drag leaves the drop target.
Remarks
The handler may adjust the dropEffect and call handled.
Occurs when a drag is being performed over the drop target.
Remarks
The handler may adjust the dropEffect and call handled.
Occurs when the drop operation is performed on the drop target.
Remarks
The handler may adjust the dropEffect and call handled.
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.