The event argument that will be used by DropTarget to notify handlers of the various events during a drag and drop operation.
Remarks
Type Details
- yFiles module
- view
Properties
Gets or sets the effects that the current handler can realize.
Remarks
Property Value
Gets the allowed effects for the current drag operation as specified by the DragSource.
Property Value
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.addEventListener('drag-enter', async (evt) => {
await something()
evt.handled = true // will be set *after* all other event listeners have been invoked, only
})
// correct:
mode.addEventListener('drag-enter', async (evt) => {
evt.handled = true // will be set immediately and 'mode' will see the change
await something()
})
Property Value
true
if handled; otherwise, false
.Gets the data that is associated with the drag.
Gets the key states relevant during the drag and drop operation.
Property Value
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