Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to get all links in diagram (Read 1225 times)
oxzorxxo
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Nov 26th, 2018
How to get all links in diagram
Dec 29th, 2018 at 11:50am
Print Post  
How to get all links in diagram
  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: How to get all links in diagram
Reply #1 - Jan 2nd, 2019 at 7:46am
Print Post  
Hi,

You can access the links array via the diagram.getLinks() getter. The following snippet shows how to iterate over the links collection and print the links' origin and destination in the browser console:

Code (Javascript)
Select All
for (var i = 0; i < diagram.getLinks().length; i++)
{
    var link = diagram.getLinks()[i];
    console.log(`Diagram link from ${link.getOrigin().getText()} to ${link.getDestination().getText()}.`);
} 



Regards,
Lyubo
  
Back to top
 
IP Logged
 
oxzorxxo
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Nov 26th, 2018
Re: How to get all links in diagram
Reply #2 - Jan 3rd, 2019 at 6:29am
Print Post  
thank you for your help
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint