Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • mxEvent

Index

Constructors

constructor

Properties

Static ACTIVATE

ACTIVATE: "activate"

Specifies the event name for activate.

Static ADD

ADD: "add"

Specifies the event name for add.

Static ADD_CELLS

ADD_CELLS: "addCells"

Specifies the event name for addCells.

Static ADD_OVERLAY

ADD_OVERLAY: "addOverlay"

Specifies the event name for addOverlay.

Static ADD_VERTEX

ADD_VERTEX: "addVertex"

Specifies the event name for addVertex.

Static AFTER_ADD_VERTEX

AFTER_ADD_VERTEX: "afterAddVertex"

Specifies the event name for afterAddVertex.

Static ALIGN_CELLS

ALIGN_CELLS: "alignCells"

Specifies the event name for alignCells.

Static BEFORE_ADD_VERTEX

BEFORE_ADD_VERTEX: "beforeAddVertex"

Specifies the event name for beforeAddVertex.

Static BEFORE_UNDO

BEFORE_UNDO: "beforeUndo"

Specifies the event name for beforeUndo.

Static BEGIN_UPDATE

BEGIN_UPDATE: "beginUpdate"

Specifies the event name for beginUpdate.

Static CELLS_ADDED

CELLS_ADDED: "cellsAdded"

Specifies the event name for cellsAdded.

Static CELLS_FOLDED

CELLS_FOLDED: "cellsFolded"

Specifies the event name for cellsFolded.

Static CELLS_MOVED

CELLS_MOVED: "cellsMoved"

Specifies the event name for cellsMoved.

Static CELLS_ORDERED

CELLS_ORDERED: "cellsOrdered"

Specifies the event name for cellsOrdered.

Static CELLS_REMOVED

CELLS_REMOVED: "cellsRemoved"

Specifies the event name for cellsRemoved.

Static CELLS_RESIZED

CELLS_RESIZED: "cellsResized"

Specifies the event name for cellsResized.

Static CELLS_TOGGLED

CELLS_TOGGLED: "cellsToggled"

Specifies the event name for cellsToggled.

Static CELL_CONNECTED

CELL_CONNECTED: "cellConnected"

Specifies the event name for cellConnected.

Static CHANGE

CHANGE: "change"

Specifies the event name for change.

Static CLEAR

CLEAR: "clear"

Specifies the event name for clear.

Static CLICK

CLICK: "click"

Specifies the event name for click.

Static CLOSE

CLOSE: "close"

Specifies the event name for close.

Static CONNECT

CONNECT: "connect"

Specifies the event name for connect.

Static CONNECT_CELL

CONNECT_CELL: "connectCell"

Specifies the event name for connectCell.

Static CUSTOM_HANDLE

CUSTOM_HANDLE: -100

Start index for the custom handles in an mxMouseEvent. This should be a negative value and is the start index which is decremented for each custom handle.

default

-100

Static DESTROY

DESTROY: "destroy"

Specifies the event name for destroy.

Static DISCONNECT

DISCONNECT: "disconnect"

Specifies the event name for disconnect.

Static DONE

DONE: "done"

Specifies the event name for done.

Static DOUBLE_CLICK

DOUBLE_CLICK: "doubleClick"

Specifies the event name for doubleClick.

Static DOWN

DOWN: "down"

Specifies the event name for down.

Static EDITING_STARTED

EDITING_STARTED: "editingStarted"

Specifies the event name for editingStarted.

Static EDITING_STOPPED

EDITING_STOPPED: "editingStopped"

Specifies the event name for editingStopped.

Static END_EDIT

END_EDIT: "endEdit"

Specifies the event name for endEdit.

Static END_UPDATE

END_UPDATE: "endUpdate"

Specifies the event name for endUpdate.

Static ESCAPE

ESCAPE: "escape"

Specifies the event name for escape.

Static EXECUTE

EXECUTE: "execute"

Specifies the event name for execute.

Static EXECUTED

EXECUTED: "executed"

Specifies the event name for executed.

Static FIRED

FIRED: "fired"

Specifies the event name for fired.

Static FIRE_MOUSE_EVENT

FIRE_MOUSE_EVENT: "fireMouseEvent"

Specifies the event name for fireMouseEvent.

Static FLIP_EDGE

FLIP_EDGE: "flipEdge"

Specifies the event name for flipEdge.

Static FOLD_CELLS

FOLD_CELLS: "foldCells"

Specifies the event name for foldCells.

Static GESTURE

GESTURE: "gesture"

Specifies the event name for gesture.

Static GET

GET: "get"

Specifies the event name for get.

Static GROUP_CELLS

GROUP_CELLS: "groupCells"

Specifies the event name for groupCells.

Static HIDE

HIDE: "hide"

Specifies the event name for hide.

Static LABEL_CHANGED

LABEL_CHANGED: "labelChanged"

Specifies the event name for labelChanged.

Static LABEL_HANDLE

LABEL_HANDLE: -1

Index for the label handle in an mxMouseEvent. This should be a negative value that does not interfere with any possible handle indices.

default

-1

Static LAYOUT_CELLS

LAYOUT_CELLS: "layoutCells"

Specifies the event name for layoutCells.

Static MARK

MARK: "mark"

Specifies the event name for mark.

Static MAXIMIZE

MAXIMIZE: "maximize"

Specifies the event name for maximize.

Static MINIMIZE

MINIMIZE: "minimize"

Specifies the event name for minimize.

Static MOUSE_DOWN

MOUSE_DOWN: "mouseDown"

Specifies the event name for mouseDown.

Static MOUSE_MOVE

MOUSE_MOVE: "mouseMove"

Specifies the event name for mouseMove.

Static MOUSE_UP

MOUSE_UP: "mouseUp"

Specifies the event name for mouseUp.

Static MOVE

MOVE: "move"

Specifies the event name for move.

Static MOVE_CELLS

MOVE_CELLS: "moveCells"

Specifies the event name for moveCells.

Static MOVE_END

MOVE_END: "moveEnd"

Specifies the event name for moveEnd.

Static MOVE_START

MOVE_START: "moveStart"

Specifies the event name for moveStart.

Static NORMALIZE

NORMALIZE: "normalize"

Specifies the event name for normalize.

Static NOTIFY

NOTIFY: "notify"

Specifies the event name for notify.

Static OPEN

OPEN: "open"

Specifies the event name for open.

Static ORDER_CELLS

ORDER_CELLS: "orderCells"

Specifies the event name for orderCells.

Static PAN

PAN: "pan"

Specifies the event name for pan.

Static PAN_END

PAN_END: "panEnd"

Specifies the event name for panEnd.

Static PAN_START

PAN_START: "panStart"

Specifies the event name for panStart.

Static POST

POST: "post"

Specifies the event name for post.

Static RECEIVE

RECEIVE: "receive"

Specifies the event name for receive.

Static REDO

REDO: "redo"

Specifies the event name for redo.

Static REFRESH

REFRESH: "refresh"

Specifies the event name for refresh.

Static REMOVE

REMOVE: "remove"

Specifies the event name for remove.

Static REMOVE_CELLS

REMOVE_CELLS: "removeCells"

Specifies the event name for removeCells.

Static REMOVE_CELLS_FROM_PARENT

REMOVE_CELLS_FROM_PARENT: "removeCellsFromParent"

Specifies the event name for removeCellsFromParent.

Static REMOVE_OVERLAY

REMOVE_OVERLAY: "removeOverlay"

Specifies the event name for removeOverlay.

Static RESET

RESET: "reset"

Specifies the event name for reset.

Static RESIZE

RESIZE: "resize"

Specifies the event name for resize.

Static RESIZE_CELLS

RESIZE_CELLS: "resizeCells"

Specifies the event name for resizeCells.

Static RESIZE_END

RESIZE_END: "resizeEnd"

Specifies the event name for resizeEnd.

Static RESIZE_START

RESIZE_START: "resizeStart"

Specifies the event name for resizeStart.

Static RESUME

RESUME: "resume"

Specifies the event name for suspend.

Static ROOT

ROOT: "root"

Specifies the event name for root.

Static ROTATION_HANDLE

ROTATION_HANDLE: -2

Index for the rotation handle in an mxMouseEvent. This should be a negative value that does not interfere with any possible handle indices.

default

-2

Static SAVE

SAVE: "save"

Specifies the event name for open.

Static SCALE

SCALE: "scale"

Specifies the event name for scale.

Static SCALE_AND_TRANSLATE

SCALE_AND_TRANSLATE: "scaleAndTranslate"

Specifies the event name for scaleAndTranslate.

Static SELECT

SELECT: "select"

Specifies the event name for select.

Static SHOW

SHOW: "show"

Specifies the event name for show.

Static SIZE

SIZE: "size"

Specifies the event name for size.

Static SPLIT_EDGE

SPLIT_EDGE: "splitEdge"

Specifies the event name for splitEdge.

Static START

START: "start"

Specifies the event name for start.

Static START_EDIT

START_EDIT: "startEdit"

Specifies the event name for startEdit.

Static START_EDITING

START_EDITING: "startEditing"

Specifies the event name for startEditing.

Static SUSPEND

SUSPEND: "suspend"

Specifies the event name for suspend.

Static TAP_AND_HOLD

TAP_AND_HOLD: "tapAndHold"

Specifies the event name for tapAndHold.

Static TOGGLE_CELLS

TOGGLE_CELLS: "toggleCells"

Specifies the event name for toggleCells.

Static TRANSLATE

TRANSLATE: "translate"

Specifies the event name for translate.

Static UNDO

UNDO: "undo"

Specifies the event name for undo.

Static UNGROUP_CELLS

UNGROUP_CELLS: "ungroupCells"

Specifies the event name for ungroupCells.

Static UP

UP: "up"

Specifies the event name for up.

Static UPDATE_CELL_SIZE

UPDATE_CELL_SIZE: "updateCellSize"

Specifies the event name for updateCellSize.

Static VIRTUAL_HANDLE

VIRTUAL_HANDLE: -100000

Start index for the virtual handles in an mxMouseEvent. This should be a negative value and is the start index which is decremented for each virtual handle. This assumes that there are no more than VIRTUAL_HANDLE - CUSTOM_HANDLE custom handles.

default

-100000

Methods

Static addGestureListeners

  • addGestureListeners(node: Node | Window, startListener: Function, moveListener?: Function, endListener?: Function): void
  • Adds the given listeners for touch, mouse and/or pointer events. If mxClient.IS_POINTER is true then pointer events will be registered, else the respective mouse events will be registered. If mxClient.IS_POINTER is false and mxClient.IS_TOUCH is true then the respective touch events will be registered as well as the mouse events.

    Parameters

    • node: Node | Window
    • startListener: Function
    • Optional moveListener: Function
    • Optional endListener: Function

    Returns void

Static addListener

  • addListener(element: Node | Window, eventName: string, funct: Function): void
  • Binds the function to the specified event on the given element. Use mxUtils.bind in order to bind the "this" keyword inside the function to a given execution scope.

    Parameters

    • element: Node | Window
    • eventName: string
    • funct: Function

    Returns void

Static addMouseWheelListener

  • addMouseWheelListener(funct: (event: Event, up: boolean) => void, target?: Node | Window): void
  • Installs the given function as a handler for mouse wheel events. The function has two arguments: the mouse event and a boolean that specifies if the wheel was moved up or down.

    This has been tested with IE 6 and 7, Firefox (all versions), Opera and Safari. It does currently not work on Safari for Mac.

    Example

    example
    mxEvent.addMouseWheelListener(function (evt, up)
    {
      mxLog.show();
      mxLog.debug('mouseWheel: up='+up);
    });
    

    Parameters

    • funct: (event: Event, up: boolean) => void

      Handler function that takes the event argument and a boolean up argument for the mousewheel direction.

        • (event: Event, up: boolean): void
        • Parameters

          • event: Event
          • up: boolean

          Returns void

    • Optional target: Node | Window

      Target for installing the listener in Google Chrome. See https://www.chromestatus.com/features/6662647093133312.

    Returns void

Static consume

  • consume(evt: Event, preventDefault?: boolean, stopPropagation?: boolean): void
  • Consumes the given event.

    Parameters

    • evt: Event

      Native event to be consumed.

    • Optional preventDefault: boolean

      Optional boolean to prevent the default for the event. Default is true.

    • Optional stopPropagation: boolean

      Option boolean to stop event propagation. Default is true.

    Returns void

Static disableContextMenu

  • disableContextMenu(element: Node): void
  • Disables the context menu for the given element.

    Parameters

    • element: Node

    Returns void

Static getClientX

  • getClientX(e: MouseEvent | TouchEvent): number
  • Returns true if the meta key is pressed for the given event.

    Parameters

    • e: MouseEvent | TouchEvent

    Returns number

Static getClientY

  • getClientY(e: MouseEvent | TouchEvent): number
  • Returns true if the meta key is pressed for the given event.

    Parameters

    • e: MouseEvent | TouchEvent

    Returns number

Static getMainEvent

  • getMainEvent(e: TouchEvent): Touch
  • getMainEvent(e: MouseEvent): MouseEvent
  • Returns the touch or mouse event that contains the mouse coordinates.

    Parameters

    • e: TouchEvent

    Returns Touch

  • Parameters

    • e: MouseEvent

    Returns MouseEvent

Static getSource

  • getSource<T>(evt: Event): T
  • Returns the event's target or srcElement depending on the browser.

    Type parameters

    • T: EventTarget = any

    Parameters

    • evt: Event

    Returns T

Static isAltDown

  • isAltDown(evt: MouseEvent): boolean
  • Returns true if the alt key is pressed for the given event.

    Parameters

    • evt: MouseEvent

    Returns boolean

Static isConsumed

Static isControlDown

  • isControlDown(evt: MouseEvent): boolean
  • Returns true if the control key is pressed for the given event.

    Parameters

    • evt: MouseEvent

    Returns boolean

Static isLeftMouseButton

  • isLeftMouseButton(evt: MouseEvent): boolean
  • Returns true if the left mouse button is pressed for the given event. To check if a button is pressed during a mouseMove you should use the mxGraph.isMouseDown property. Note that this returns true in Firefox for control+left-click on the Mac.

    Parameters

    • evt: MouseEvent

    Returns boolean

Static isMetaDown

  • isMetaDown(evt: MouseEvent): boolean
  • Returns true if the meta key is pressed for the given event.

    Parameters

    • evt: MouseEvent

    Returns boolean

Static isMiddleMouseButton

  • isMiddleMouseButton(evt: MouseEvent): boolean
  • Returns true if the middle mouse button is pressed for the given event. To check if a button is pressed during a mouseMove you should use the mxGraph.isMouseDown property.

    Parameters

    • evt: MouseEvent

    Returns boolean

Static isMouseEvent

  • isMouseEvent(evt: Event): boolean
  • Returns true if the event was generated using a mouse (not a pen or touch device).

    Parameters

    • evt: Event

    Returns boolean

Static isMultiTouchEvent

  • isMultiTouchEvent(evt: Event): boolean
  • Returns true if the event was generated using a touch device (not a pen or mouse).

    Parameters

    • evt: Event

    Returns boolean

Static isPenEvent

  • isPenEvent(evt: Event): boolean
  • Returns true if the event was generated using a pen (not a touch device or mouse).

    Parameters

    • evt: Event

    Returns boolean

Static isPopupTrigger

  • isPopupTrigger(evt: Event): boolean
  • Returns true if the event is a popup trigger. This implementation returns true if the right button or the left button and control was pressed on a Mac.

    Parameters

    • evt: Event

    Returns boolean

Static isRightMouseButton

  • isRightMouseButton(evt: MouseEvent): boolean
  • Returns true if the right mouse button was pressed. Note that this button might not be available on some systems. For handling a popup trigger isPopupTrigger should be used.

    Parameters

    • evt: MouseEvent

    Returns boolean

Static isShiftDown

  • isShiftDown(evt: MouseEvent): boolean
  • Returns true if the shift key is pressed for the given event.

    Parameters

    • evt: MouseEvent

    Returns boolean

Static isTouchEvent

  • isTouchEvent(evt: Event): boolean
  • Returns true if the event was generated using a touch device (not a pen or mouse).

    Parameters

    • evt: Event

    Returns boolean

Static redirectMouseEvents

  • redirectMouseEvents(node: Node | Window, graph: mxGraph, state: mxCellState | ((event: Event) => mxCellState), down?: Function, move?: Function, up?: Function, dblClick?: Function): void
  • Redirects the mouse events from the given DOM node to the graph dispatch loop using the event and given state as event arguments. State can either be an instance of mxCellState or a function that returns an mxCellState. The down, move, up and dblClick arguments are optional functions that take the trigger event as arguments and replace the default behaviour.

    Parameters

    • node: Node | Window
    • graph: mxGraph
    • state: mxCellState | ((event: Event) => mxCellState)
    • Optional down: Function
    • Optional move: Function
    • Optional up: Function
    • Optional dblClick: Function

    Returns void

Static release

  • release(element: Node | Window): void
  • Removes the known listeners from the given DOM node and its descendants.

    Parameters

    • element: Node | Window

      DOM node to remove the listeners from.

    Returns void

Static removeAllListeners

  • removeAllListeners(element: Node | Window): void
  • Removes all listeners from the given element.

    Parameters

    • element: Node | Window

    Returns void

Static removeGestureListeners

  • removeGestureListeners(node: Node | Window, startListener: Function, moveListener?: Function, endListener?: Function): void
  • Removes the given listeners from mousedown, mousemove, mouseup and the respective touch events if mxClient.IS_TOUCH is true.

    Parameters

    • node: Node | Window
    • startListener: Function
    • Optional moveListener: Function
    • Optional endListener: Function

    Returns void

Static removeListener

  • removeListener(element: Node | Window, eventName: string, funct: Function): void
  • Removes the specified listener from the given element.

    Parameters

    • element: Node | Window
    • eventName: string
    • funct: Function

    Returns void

Generated using TypeDoc