Skip to main content

Editor events overview

NameDescription
afterGroupMoveFires when a group or swimlane is moved one grid step
afterItemCatchFires after an item is caught
afterItemMoveFires when an item is moved one grid step
afterLineTitleMoveFires when a text element of a line is moved one grid step
afterShapeIconClickFires after clicking a control in the per-item toolbar
afterShapeMoveFires when a shape is moved one grid step
applyButtonFires after the Apply All button has been clicked
autoLayoutFires after the Auto Layout button has been clicked
beforeGroupMoveFires before a group or swimlane is moved
beforeItemCatchFires before an item is caught
beforeItemMoveFires before an item is moved
beforeLineTitleMoveFires before a text element of a line is moved
beforeShapeIconClickFires before clicking a control in the per-item toolbar
beforeShapeMoveFires before a shape is moved
changeGridStepFires after the value of the grid step has been changed
exportDataFires after the Export Data button has been clicked
groupMoveEndFires after a group or swimlane is moved
importDataFires after the Import Data button has been clicked
itemMoveEndFires after an item is moved
itemTargetFires when the moved item is under the target item
lineTitleMoveEndFires after a text element of a line is moved
resetButtonFires after the Reset Changes button has been clicked
shapeMoveEndFires after a shape is moved
shapeResizeFires after a shape has been resized
visibilityFires after the Visibility button has been clicked
zoomInFires after the Zoom In button has been clicked
zoomOutFires after the Zoom Out button has been clicked

In addition to the events listed above, you may also apply events of the diagram object while working in the editor. Here is an example of applying the itemClick event of the Diagram object in the editor:

editor.diagram.events.on("itemClick", (id, event) => {
console.log(id, event);
});