mouseDrop property

(void Function(InputEvent, GraphObject)?) mouseDrop

Gets or sets the function to execute when a user drops the selection on this object at the end of a DraggingTool drag; this allows you to customize the behavior when a drop occurs on an object.

If this property value is a function, it is called with an InputEvent, this 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. The function is called within the transaction performed by the DraggingTool, so you do not need to conduct one. By default this property is null.

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

Implementation

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

Implementation

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