<ejs-diagram #diagram id="diagram" width="100%" height="100%" [snapSettings]='snapSettings'
[nodes]="nodes" [connectors]="connectors" (drop)="drop($event)">
</ejs-diagram>
public drop(args: IDropEventArgs): void {
// get dropped element
let droppedElement = args.element;
//get target element lane
let targetElement = args.target;
//get a swimlane
let swimlane = this.diagram.getObject((args.target as any).parentId);
} |
Query |
Response | |
Add shape into lane - id or number of lane that is parent for dropped shape(when there is more than one lane in swimlane). |
In the drop event, we have shown how to get the swimlane and lanes count. Please refer to a code example and sample below.
Code example:
| |
Add lane into existing swimlane - how to determine that this is new lane(and parentId of swimlane) not new swimlane and position(at the end/start). |
When we add a new lane into a existing swimlane, the collectionChange event gets triggered. In this event, you will get a lane object. However we have an issue in this event. We have logged a defect report on this. The patch for the reported issue will be available in our weekly patch release 23rd October, 2019.
You can track the status of this issue in the below feedback link.
|