Hi Enova,
When you draw a connector from port to port, the collectionChange event will be triggered. In your sample, you have shown a console for node alone in the collectionChange event. We have modified it for connectors. Could you please check in the below modified sample?
Code example:
collectionChange: function(args) {
if(args.state !== 'Changed') return;
var obj = args.element;
if (obj instanceof ej.diagrams.Node) {
var pId = obj.parentId;
console.log('Event: collectionChange', "id: [" + obj.id + "]", "parentId: [" + pId + "]");
}
if(obj instanceof ej.diagrams.Connector) {
var pId = obj.parentId;
console.log('Event: collectionChange', "id: [" + obj.id + "]", "parentId: [" + pId + "]");
}
}, |
Regards,
Shyam G