ShapeIconClick

fires on clicking a toolbar icon

void ShapeIconClick(string|number id){ ... };

Parameters

idstring|numberthe id of a shape

Example

var diagram = new dhx.Diagram("diagram_container", { 
    toolbar: [
      {
        id:"download",
        content:"<i class='zmdi zmdi-download'></i>"
      },
      {
        id:"info",
        content:"<i class='zmdi zmdi-info-outline'></i>"
      }
    ]
});
 
diagram.events.on("ShapeIconClick", function(icon){
    var id = diagram.selection.getId();
    alert(icon + " was clicked for id = " + id);
});

Related samples

See also
Back to top