TreeCollection Events of Toolbar
You can use the following TreeCollection events of Suite 8:
Name | Description |
---|---|
afterAdd | Fires after adding a new item into a tree collection |
afterRemove | Fires after removing a new item from a tree collection |
beforeAdd | Fires before adding a new item into a tree collection |
beforeRemove | Fires before removing an item from a tree collection |
change | Fires when a tree collection is modified |
filter | Fires after filtering a tree collection |
load | Fires when items are loaded in a tree collection |
loadError | Fires when loading of data fails |
removeAll | Fires 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
});
// loads new toolbar data
editor.toolbar.parse(["file", "spacer", "scale"]);