itemClick

fires on clicking an item

void itemClick(string|number id,MouseEvent event){ ... };

Parameters

idstring|numberthe id of an item
eventMouseEventa native HTML event object

Example

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

Related samples

Details

If a click is done over a swimlane, the event will be fired on the cell of the swimlane.

See also
Change log

Added in v4.0

Back to top