mouseDragOver property
Gets or sets the function to execute when the user is dragging the selection in the background of the Diagram during a DraggingTool drag-and-drop, not over any GraphObjects.
If this property value is a function, it is called with an InputEvent. It is called within the transaction performed by the DraggingTool. By default this property is null.
Note that for a drag-and-drop that originates in a different diagram, the target diagram's selection collection will not be the parts that are being dragged. Instead the temporary parts being dragged can be found as the source diagram's DraggingTool#copiedParts.
This function is called with Diagram#skipsUndoManager temporarily set to true, so that any changes to GraphObjects are not recorded in the UndoManager. You do not need to start and commit any transaction in this function. After calling this function the diagram will be updated immediately.
For example, if you want to prevent the user from dropping Parts into the background of the diagram, and want to provide feedback about that during a drag:
myDiagram.mouseDragOver = e => {
myDiagram.currentCursor = "no-drop";
}
Implementation
void Function(_i3.InputEvent)? get mouseDragOver =>
(_i3.InputEvent p0) => _i4.callMethod(
_i4.getProperty(
this,
'mouseDragOver',
),
r'call',
[
this,
p0,
],
);
Implementation
set mouseDragOver(void Function(_i3.InputEvent)? value) {
_i4.setProperty(
this,
'mouseDragOver',
value == null ? _i5.undefined : _i4.allowInterop(value),
);
}