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.
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:

Created:

Updated:

Platform:

Replies:

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

Hi 

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

https://1drv.ms/u/s!AgxIdbDPqmRThVbv_KJjsCwduwsj

Thanks
Robert


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); 
 } 
 
Regards, 
Shyam G 


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

Hi Shyam

Thanks using model instead works as expected

Thanks
Robert


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. 
Regards, 
Shyam G 


CONFIRMATION

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.

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

;