mouseDragEnter property

void Function(InputEvent, GraphObject, GraphObject)? get mouseDragEnter

Gets or sets the function to execute when the user moves the mouse into this stationary object during a DraggingTool drag; this allows you to provide feedback during a drag based on where it might drop.

If this property value is a function, it is called with an InputEvent, this GraphObject, and any previous GraphObject. The InputEvent#targetObject provides the GraphObject that was found at the mouse point before looking up the visual tree of GraphObject#panels to get to this object. 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, because the DraggingTool will be conducting one already. After calling this function the diagram will be updated immediately.

For an example of a mouseDragEnter event handler, see the node template in the Org Chart Editor sample.

Implementation

void Function(
  _i3.InputEvent,
  _i3.GraphObject,
  _i3.GraphObject,
)? get mouseDragEnter => (
      _i3.InputEvent p0,
      _i3.GraphObject p1,
      _i3.GraphObject p2,
    ) =>
        _i4.callMethod(
          _i4.getProperty(
            this,
            'mouseDragEnter',
          ),
          r'call',
          [
            this,
            p0,
            p1,
            p2,
          ],
        );
set mouseDragEnter (void value(InputEvent, GraphObject, GraphObject)?)

Implementation

set mouseDragEnter(
    void Function(
      _i3.InputEvent,
      _i3.GraphObject,
      _i3.GraphObject,
    )? value) {
  _i4.setProperty(
    this,
    'mouseDragEnter',
    value == null ? _i5.undefined : _i4.allowInterop(value),
  );
}