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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Create connector directly from ports

Thread ID:





149129 Nov 15,2019 10:40 AM UTC Nov 18,2019 11:25 AM UTC JavaScript - EJ 2 1
Tags: Diagram
Asked On November 15, 2019 10:40 AM UTC


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

Shyam G [Syncfusion]
Replied On 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 


This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon