beforeSubmenuOpen

fires before the menu of the subheader is opened

boolean beforeSubmenuOpen(string|number id,MouseEvent event,string subHeaderId){ ... };

Parameters

idstring|numberthe id of a swimlane
eventMouseEventa native HTML event object
subHeaderIdstringthe id of a subheader of a swimlane

Returns

booleanfalse - to block opening the subheader, otherwise true

Example

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

See also
Change log

Added in v4.0

Back to top