Hi Rakhi,
Please use “collectionChange” event to get the node/connector details while adding into the diagram. Also use “connectionChange” event to get source/target node details from the connector while changing the connection. Please refer to the below code example and sample.
Code example:
public connectionChange(args: IConnectionChangeEventArgs): void {
if (args.state === 'Changed') {
let connector = args.connector;
//Get from/to node details using sourceid/targetId while changing the connection...
}
}
public collectionChange(args: ICollectionChangeEventArgs): void {
if(args.state === 'Changed'){
let node = args.element;
//Get node/connector details from here while adding the node/connectors...
}
}
Regards,
Naganathan K G