We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Create connector directly from ports


We prepared example project to explain issue that we found.



When we try to create connector directly from shapes port to another port of different shape, there is no events raised.

More details are expalined inside example project with pictures.

Attachment: Connectors_3abdbd5b.7z

1 Reply

SG Shyam G Syncfusion Team November 18, 2019 11:25 AM UTC

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 + "]"); 
Shyam G 

Live Chat Icon For mobile
Up arrow icon