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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Connector totals don't add up when adding connector target as end node.

Thread ID:





130663 May 24,2017 10:51 AM UTC May 26,2017 03:57 AM UTC Angular 3
Tags: ejDiagram
Robert Williamson
Asked On May 24, 2017 10:51 AM UTC


I've been trying to make use of the nodes and connectors and noticed that the numbers don't match up to what is in the grid. Below is an example where i have 3 nodes and 2 connectors. 

When i click on Check Numbers it will fire a method which will tell me the number of nodes and number of connectors in an alert

AS you can see from the above image the nodes is correct but connectors is wrong, when debugging i noticed that the one that is missing is going between my activity and end node. Also while debugging ive noticed that if i had more than 1 going to end node sometimes a connector is added which both the source and target node being null. Is this expected? 

My project was too big to put in so please find attached in the following URL, this was made using Visual Studio Code



Shyam G [Syncfusion]
Replied On May 25, 2017 09:10 AM UTC

Hi Robert, 
Please use diagram.model.nodes.length and diagram.model.connectors.length to get the nodes and connectors count respectively and should not use diagram._nodes.length and diagram._connectors.length because it’s an private API used internally. Please refer to the modified code example 
Code example: 
private checkNumbers() {       
     var diagram = $("#diagramCore").ejDiagram("instance"); 
     alert("Nodes: " + diagram.model.nodes.length + ". Connectors: " + diagram.model.connectors.length); 
Shyam G 

Robert Williamson
Replied On May 25, 2017 10:59 AM UTC

Hi Shyam

Thanks using model instead works as expected


Shyam G [Syncfusion]
Replied On May 26, 2017 03:57 AM UTC

Hi Robert, 
Please let us know if you need further assistance on this. 
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

or the page will be automatically redirected to 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