First published in the Language finch documentation

It can be divided into several categories:

  1. Official custom action event
  2. Editor events
  3. Common event
  4. Node event
  5. Boundary events
  6. The canvas event

(You can click on all the above links, which will redirect you to Ggeditor’s Github repository)

manual

It may not be the latest version, please refer to the Github repository of GG-Editor

Official custom action event

export enum GraphCustomEvent {
  /** Fires */ before calling the add/addItem method
  onBeforeAddItem = 'beforeadditem'./** Fires */ after calling the add/addItem method
  onAfterAddItem = 'afteradditem'./** Fires */ before calling the remove/removeItem method
  onBeforeRemoveItem = 'beforeremoveitem'./** Triggers */ after calling the remove/removeItem method
  onAfterRemoveItem = 'afterremoveitem'./** Fires */ before calling the update/updateItem method
  onBeforeUpdateItem = 'beforeupdateitem'./** Triggers */ after calling the update/updateItem method
  onAfterUpdateItem = 'afterupdateitem'./** Trigger */ before calling the showItem/hideItem method
  onBeforeItemVisibilityChange = 'beforeitemvisibilitychange'./** Triggered after the showItem/hideItem method is called
  onAfterItemVisibilityChange = 'afteritemvisibilitychange'./** Fires */ before calling the setItemState method
  onBeforeItemStateChange = 'beforeitemstatechange'.*/ is triggered after the setItemState method is called
  onAfterItemStateChange = 'afteritemstatechange'./** Trigger */ before calling the refreshItem method
  onBeforeRefreshItem = 'beforerefreshitem'./** When the refreshItem method is called */
  onAfterRefreshItem = 'afterrefreshitem'./** Fires */ before calling the clearItemStates method
  onBeforeItemStatesClear = 'beforeitemstatesclear'.*/ is triggered after the clearItemStates method is called
  onAfterItemStatesClear = 'afteritemstatesclear'./** Trigger before layout. Render is laid out when called, so render fires. Or when the user actively calls the layout of the diagram
  onBeforeLayout = 'beforelayout'./** Triggers when the layout is complete. Render is called with layout, so it fires when the layout is done. Or the user actively calls the layout of the diagram when the layout is complete
  onAfterLayout = 'afterlayout'./** Triggers */ before the connection is complete
  onBeforeConnect = 'beforeconnect'./** Triggers */ when the connection is complete
  onAfterConnect = 'afterconnect',}Copy the code

Editor events

export enum EditorEvent {
  /** Triggers */ before invoking the command
  onBeforeExecuteCommand = 'onBeforeExecuteCommand'./** triggers */ after invoking the command
  onAfterExecuteCommand = 'onAfterExecuteCommand'./** Change the state of the screen trigger */
  onGraphStateChange = 'onGraphStateChange'./** Changing the label status triggers */
  onLabelStateChange = 'onLabelStateChange',}Copy the code

Common event

export enum GraphCommonEvent {
  /** Triggers */ when the left mouse button is clicked or the Enter key is pressed
  onClick = 'click'./** Trigger */ when double clicking the left mouse button
  onDoubleClick = 'dblclick'./** The event does not bubble when the mouse moves over its descendant element
  onMouseEnter = 'mouseenter'./** The mouse is constantly triggered as it moves within the element, not via the keyboard
  onMouseMove = 'mousemove'./** Triggers */ when the mouse moves out of the target element
  onMouseOut = 'mouseout'./** When the mouse moves over the target element, the cursor moves over its descendant element */
  onMouseOver = 'mouseover'./** This event does not bubble when the mouse moves out of the range of the element, i.e. */ does not fire when the mouse moves over its descendant element
  onMouseLeave = 'mouseleave'./** The mouse button is triggered when it is pressed (left or right), not by the keyboard
  onMouseDown = 'mousedown'./** When the mouse button is released, it can't be triggered by the keyboard
  onMouseUp = 'mouseup'./** Triggers and opens the context menu */ when the user right-clicks the mouse
  onContextMenu = 'contextmenu'./** The event that is triggered when the dragged element starts to be dragged. This event applies to the dragged element
  onDragStart = 'dragstart'./** The event that is triggered when an element is being dragged. This event applies to the element being dragged
  onDrag = 'drag'./** The event that is triggered when the drag is complete. This event applies to the dragged element */
  onDragEnd = 'dragend'./** The event that is triggered when the drag element enters the target element. This event applies to the target element
  onDragEnter = 'dragenter'./** The event that is triggered when the drag element leaves the target element. This event is applied to the target element
  onDragLeave = 'dragleave'./** The dragged element is over the target element while the mouse is released. This event is triggered on the target element */
  onDrop = 'drop'./** Press the keyboard key to trigger the event */
  onKeyDown = 'keydown'./** Release the keyboard key to trigger the event */
  onKeyUp = 'keyup'./** Triggers when a finger touches the screen, even if a finger is already on the screen */
  onTouchStart = 'touchstart'./** Fires continuously when a finger is swiped across the screen. Call the preventDefault() event to prevent scrolling during this event. * /
  onTouchMove = 'touchmove'./** Triggers when the finger leaves the screen */
  onTouchEnd = 'touchend',}Copy the code

Node event

export enum GraphNodeEvent {
  /** When the left mouse button is clicked on a node, */ is triggered
  onNodeClick = 'node:click'./** When the left mouse button is double clicked */
  onNodeDoubleClick = 'node:dblclick'./** Triggers */ when the mouse moves over the node
  onNodeMouseEnter = 'node:mouseenter'./** The mouse is triggered continuously when moving within the node, not by the keyboard */
  onNodeMouseMove = 'node:mousemove'./** Triggers */ when the mouse moves out of the node
  onNodeMouseOut = 'node:mouseout'./** Triggers */ when the mouse moves over the node
  onNodeMouseOver = 'node:mouseover'./** Triggers */ when the mouse moves out of the node
  onNodeMouseLeave = 'node:mouseleave'./** The mouse button is triggered when it is pressed (left or right) on the node. */ cannot be triggered by the keyboard
  onNodeMouseDown = 'node:mousedown'./** Triggered when the mouse button pressed on the node is released, not triggered by the keyboard */
  onNodeMouseUp = 'node:mouseup'./** Triggers and opens the right-click menu */ when the user right-clicks the mouse on the node
  onNodeContextMenu = 'node:contextmenu'./** The event that is triggered when a node starts to be dragged. This event is applied to the dragged node
  onNodeDragStart = 'node:dragstart'./** The event that is triggered when a node is being dragged. This event applies to the node being dragged */
  onNodeDrag = 'node:drag'./** The event that is triggered when the drag is complete. This event is applied to the dragged node
  onNodeDragEnd = 'node:dragend'./** The event that is triggered when the drag node enters the target element. This event is applied to the target element
  onNodeDragEnter = 'node:dragenter'./** The event that is triggered when the drag node leaves the target element. This event applies to the target element
  onNodeDragLeave = 'node:dragleave'./** The dragged node is over the target element at the same time that the mouse release triggers an event that acts on the target element */
  onNodeDrop = 'node:drop',}Copy the code

Boundary events

export enum GraphEdgeEvent {
  /** When the left mouse button is clicked */
  onEdgeClick = 'edge:click'./** Triggers */ when the left mouse button is double-clicked
  onEdgeDoubleClick = 'edge:dblclick'./** Triggers */ when the mouse moves over an edge
  onEdgeMouseEnter = 'edge:mouseenter'./** The mouse moves over the edge and triggers continuously, not via keyboard */
  onEdgeMouseMove = 'edge:mousemove'./** Triggers */ when the mouse moves out of the edge
  onEdgeMouseOut = 'edge:mouseout'./** Triggers */ when the mouse moves over the edge
  onEdgeMouseOver = 'edge:mouseover'./** Triggers */ when the mouse moves over an edge
  onEdgeMouseLeave = 'edge:mouseleave'./** The mouse button is triggered when it is pressed on the side (left or right), not by the keyboard
  onEdgeMouseDown = 'edge:mousedown'./** * when the mouse button pressed on the side is released, it can not be triggered by the keyboard */
  onEdgeMouseUp = 'edge:mouseup'./** Triggers and opens the right-click menu */ when the user right-clicks the mouse on the side
  onEdgeContextMenu = 'edge:contextmenu',}Copy the code

The canvas event

export enum GraphCanvasEvent {
  /** Triggers */ when the canvas is left mouse-clicked
  onCanvasClick = 'canvas:click'./** Triggers */ when the mouse double-clicks the canvas
  onCanvasDoubleClick = 'canvas:dblclick'./** Triggers */ when the mouse moves over the canvas
  onCanvasMouseEnter = 'canvas:mouseenter'./** * the mouse is constantly triggered as it moves inside the canvas, not by keyboard */
  onCanvasMouseMove = 'canvas:mousemove'./** Triggers */ when the mouse moves out of the canvas
  onCanvasMouseOut = 'canvas:mouseout'./** Triggers */ when the mouse moves over the canvas
  onCanvasMouseOver = 'canvas:mouseover'./** Triggers */ when the mouse moves out of the canvas
  onCanvasMouseLeave = 'canvas:mouseleave'./** The mouse button is triggered when it is pressed (left or right) on the canvas
  onCanvasMouseDown = 'canvas:mousedown'./** The mouse button pressed on the canvas is released when it is up
  onCanvasMouseUp = 'canvas:mouseup'./** Triggers and opens the right-click menu */ when the user right-clicks on the canvas
  onCanvasContextMenu = 'canvas:contextmenu'./** The event that is triggered when the canvas starts to be dragged */
  onCanvasDragStart = 'canvas:dragstart'./** The event that is triggered when the canvas is being dragged */
  onCanvasDrag = 'canvas:drag'./** The event that is triggered when the drag is complete. This event applies to the dragged canvas */
  onCanvasDragEnd = 'canvas:dragend'./** The event that is triggered when the canvas is dragged into the target element. This event is applied to the target element
  onCanvasDragEnter = 'canvas:dragenter'./** The event that is triggered when the canvas is dragged away from the target element. This event is applied to the target element
  onCanvasDragLeave = 'canvas:dragleave',}Copy the code