Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Text of node on link created (Read 2385 times)
liza
Full Member
***
Offline


I Love MindFusion!

Posts: 132
Joined: Apr 25th, 2019
Text of node on link created
May 22nd, 2019 at 7:50am
Print Post  
Hi, OnLinkCreated event, can I get the text of source node and destination node?
function onLinkCreated(s, e) {
//get the text of source-node(s)
//and text of destination-node(e)
}
  
Back to top
AIM  
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Text of node on link created
Reply #1 - May 22nd, 2019 at 8:00am
Print Post  
Code (Javascript)
Select All
function onLinkCreated(sender, args) {
    var link = args.getLink();

    var originNode = link.getOrigin();
    var originText = originNode.getText();

    var destinationNode = link.getDestination();
    var destinationText = destinationNode.getText();

    // ...
} 



Regards,
Lyubo
  
Back to top
 
IP Logged
 
liza
Full Member
***
Offline


I Love MindFusion!

Posts: 132
Joined: Apr 25th, 2019
Re: Text of node on link created
Reply #2 - May 23rd, 2019 at 2:36am
Print Post  
Thanks, I did it in the folowing way :
var destinationtext = e.link.getDestination().text.text;
    var sourcetext = e.link.getOrigin().text.text;
  
Back to top
AIM  
IP Logged
 
liza
Full Member
***
Offline


I Love MindFusion!

Posts: 132
Joined: Apr 25th, 2019
Re: Text of node on link created
Reply #3 - May 23rd, 2019 at 4:39am
Print Post  
When I use to access node id on onnodedelete event it is showing undefined. Please can u help me
e.node.id
  
Back to top
AIM  
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: Text of node on link created
Reply #4 - May 23rd, 2019 at 10:35am
Print Post  
Hi,

Where are you setting the id? It will have an undefined value if it isn't set.

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