beforeCellsAdd
Description
Fires before new cells are added to a swimlane
Usage
beforeCellsAdd: (swimlaneId: string | number) => boolean | void;
Parameters
The callback of the event takes the following parameter:
swimlaneId
- (required) the id of the item
Returns
Return false
to prevent adding of new cells, otherwise true
Example
// initializing Diagram
const diagram = new dhx.Diagram("diagram_container", {
type: "default"
});
// loading data
diagram.data.parse(data);
// attaching a handler to the event
diagram.events.on("beforeCellsAdd", (swimlaneId) => {
console.log(swimlaneId);
return true;
});
Change log: Added in v4.0
Related articles: Configuring Swimlanes