Class InternalMouseEvent

Base class for all mouse events in mxGraph. A listener for this event should implement the following methods:

graph.addMouseListener(
{
mouseDown: (sender, evt)=>
{
GlobalConfig.logger.debug('mouseDown');
},
mouseMove: (sender, evt)=>
{
GlobalConfig.logger.debug('mouseMove');
},
mouseUp: (sender, evt)=>
{
GlobalConfig.logger.debug('mouseUp');
}
});

Constructor: mxMouseEvent

Constructs a new event object for the given arguments.

Native mouse event.

Optional under the mouse.

Constructors

Properties

consumed: boolean = false

Holds the consumed state of this event.

evt: MouseEvent

Holds the inner event object.

graphX: number

Holds the x-coordinate of the event in the graph. This value is set in Graph#fireMouseEvent.

graphY: number

Holds the y-coordinate of the event in the graph. This value is set in Graph#fireMouseEvent.

sourceState: null | CellState

Holds the that was passed to the constructor. This can be different from depending on the result of Graph#getEventState.

state: null | CellState

Holds the optional associated with this event.

Methods

  • Sets to true and invokes preventDefault on the native event if such a method is defined. This is used mainly to avoid the cursor from being changed to a text cursor in Webkit. You can use the preventDefault flag to disable this functionality.

    Parameters

    • OptionalpreventDefault: boolean

      Specifies if the native event should be canceled. Default is true.

    Returns void