The event argument that will be used by DropTarget to notify handlers of the various events during a drag and drop operation.
Type Details
- yfiles module
- view-component
- yfiles-umd modules
- All view modules
- Legacy UMD name
- yfiles.view.DragEventArgs
Properties
Gets or sets the effects that the current handler can realize.
Remarks
Gets the allowed effects for the current drag operation as specified by the DragSource.
Gets or sets a value indicating whether this DragEventArgs has been handled.
Remarks
This property needs to be adjusted by handlers to tell the engine that the event has been handled.
Note that this property needs to be set before the function synchronously returns. This means that setting the value in an async
function after the first await
or in an asynchronous callback, it cannot not be seen by the emitter of the event and the sender will consider the event as not being handled.
// wrong:
mode.addDragEnterListener(async (sender, args) => {
await something()
args.handled = true // will be set *after* all other event listeners have been invoked, only
})
// correct:
mode.addDragEnterListener(async (sender, args) => {
args.handled = true // will be set immediately and 'mode' will see the change
await something()
})
Gets the data that is associated with the drag.
See Also
Gets the key states relevant during the drag and drop operation.
Methods
Gets the position of the current drag operation in the coordinates system of the provided element.
Parameters
A map of options to pass to the method.
- element - HTMLElement
- The element for which the coordinates should be used.
Returns
- ↪Point
- The position in the coordinates system of
element