Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Need to select the diagram node (Read 2560 times)
Shafi
Full Member
***
Offline


I Love MindFusion!

Posts: 109
Joined: Nov 8th, 2016
Need to select the diagram node
Nov 21st, 2017 at 9:07am
Print Post  
Hi

I need to select the diagram node from outside event and make the node little bit grey so that user come to know which node is selected now.

Thanks
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Need to select the diagram node
Reply #1 - Nov 21st, 2017 at 11:50am
Print Post  
Hi,

Call node.setSelected(true) and node.setBrush("gray");

Regards,
Slavcho
  
Back to top
 
IP Logged
 
Shafi
Full Member
***
Offline


I Love MindFusion!

Posts: 109
Joined: Nov 8th, 2016
Re: Need to select the diagram node
Reply #2 - Nov 21st, 2017 at 1:18pm
Print Post  
Thanks a lot for reply.

Is there any way to access the node via diagram object if it is having unique id to that? As we are having tree which is represented as diagram now if we select one of the tree node, diagram node should should also get highlighted.
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Need to select the diagram node
Reply #3 - Nov 21st, 2017 at 4:23pm
Print Post  
Use the array API to find node you need, something like Diagram.getNodes().find(node => node.getId() == id);
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint