Skip to main content

Toolbar events overview

You can use the following Toolbar events of Suite 8:

NameDescription
afterHideFires after hiding a sub-item of Toolbar
beforeHideFires before hiding a sub-item of Toolbar
clickFires after a click on a control
inputFires on entering a text into the input field
inputBlurFires when a control is blurred
inputChangeFires on changing the value in the Input control of Toolbar
inputFocusFires when a control is focused
keydownFires when any key is pressed and a control of Toolbar is in focus
openMenuFires on expanding a menu control
const editor = new dhx.DiagramEditor("editor_container", {
type: "default",
view: {
toolbar: true
}
});
// handles the "click" event
editor.toolbar.events.on("click", (id, event) => {
// some logic
});

TreeCollection events overview

You can use the following TreeCollection events of Suite 8:

NameDescription
afterAddFires after adding a new item into a tree collection
afterRemoveFires after removing a new item from a tree collection
beforeAddFires before adding a new item into a tree collection
beforeRemoveFires before removing an item from a tree collection
changeFires when a tree collection is modified
filterFires after filtering a tree collection
loadFires when items are loaded in a tree collection
loadErrorFires when loading of data fails
removeAllFires when all items are removed from a tree collection
const editor = new dhx.DiagramEditor("editor_container", {
type: "default",
view: {
toolbar: true
}
});
// handles the "load" event
editor.toolbar.events.on("load", () => {
// some logic here
});
// load new toolbar data
editor.toolbar.parse(["file", "spacer", "scale"]);