mouseHover property

(void Function(InputEvent, GraphObject)?) mouseHover

Gets or sets the function to execute when the user holds the mouse still for a while over this object without holding down any buttons. This property is used by the ToolManager.

If this property value is a function, it is called with an InputEvent. By default this property is null.

If you do provide a function that makes changes to the diagram or to its model, you should do so within a transaction -- call Diagram#startTransaction and Diagram#commitTransaction.

You can control how long the user must wait with a motionless mouse before a "mouse hover" event occurs, by setting ToolManager#hoverDelay. For example:

myDiagram = new go.Diagram("myDiagramDiv",
    { "toolManager.hoverDelay": 500 });  // 500 milliseconds

or:

myDiagram.toolManager.hoverDelay = 500;  // 500 milliseconds

Implementation

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

Implementation

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