Skip to main content

afterShapeIconClick

Description

Fires after clicking a control in the per-item toolbar

Usage

afterShapeIconClick: (
iconId: string,
shape: object
) => void;

Parameters

The callback of the event takes the following parameters:

  • iconId - (required) the type or id of the toolbar control
  • shape - (required) an object with the item configuration

Example

// initializing Diagram Editor
const editor = new dhx.DiagramEditor("editor_container");
// loading data
editor.parse(data);

// attaching a handler to the event
editor.events.on("afterShapeIconClick", function(iconId, shape) {
console.log("You've clicked the", iconId, "toolbar control", shape);
return true;
});

Change log: Added in v3.1