Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Changes to Link Text Doesn't Appear on the Diagram (Read 1433 times)
alukes
Junior Member
**
Offline


I love YaBB 1G - SP1!

Posts: 61
Joined: Jul 1st, 2011
Changes to Link Text Doesn't Appear on the Diagram
Sep 5th, 2016 at 3:28am
Print Post  
function linkTextSet(destId, tf) {
diagram.links.forEach(function (link)
           {
     if (diagramLink.getDestination().getId() === destId)
           diagramLink.setText(tf);
           });
}

I step through the code above and see that diagramLink.setText(tf) is stepped through, but the change never shows on the diagram, even though when I look at the link object I see that the text has changed. Also the diagramLink.setText(tf) is stepped through twice even though it should  only match once.

Looks like the same link twice based on the origin and destination object IDs. In reality the two links originate from the same object, but terminate on two different objects.


thanks
« Last Edit: Sep 5th, 2016 at 5:14am by alukes »  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3148
Joined: Oct 19th, 2005
Re: Changes to Link Text Doesn't Appear on the Diagram
Reply #1 - Sep 5th, 2016 at 10:15am
Print Post  
You've declared the forEach's callback argument as "link' but then call "diagramLink" methods. Make sure you use the same name.

Regards,
Slavcho
Mindfusion
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint