Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Iterating through DiagramLinkList (Read 1386 times)
choohj70
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 77
Joined: Sep 23rd, 2008
Iterating through DiagramLinkList
Jun 3rd, 2009 at 3:58am
Print Post  
How do you iterate through the DiagramLinkList that was determine by e.getNode.getIncomingLinks()?

Thank you.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: Iterating through DiagramLinkList
Reply #1 - Jun 3rd, 2009 at 5:05am
Print Post  
You must use the List methods to find the list size and get a link by its index in the list.

Code
Select All
function onNodeModified(sender, args)
{
	var node = args.getNode();
	var inLinks = node.getIncomingLinks();
	for (i = 0; i < inLinks.size(); ++i)
	{
		var link = inLinks.get(i);
		link.setText("test");
	}
}
 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint