Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic How to get all node (Read 1433 times)
oxzorxxo
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 13
Joined: Nov 26th, 2018
How to get all node
Dec 1st, 2018 at 12:54am
Print Post  
how to get all node to get shape name and to count all nodes ... i want to do something like if node shapeid then
thank you in advance
  
Back to top
 
IP Logged
 
Lyubo
God Member
*****
Offline


MindFusion team

Posts: 511
Joined: Jun 17th, 2010
Re: How to get all node
Reply #1 - Dec 3rd, 2018 at 7:34am
Print Post  
Hi,

Try this:
Code (Javascript)
Select All
for (var i = 0; i < diagram.getNodes().length; i++)
{
    var node = diagram.getNodes()[i];
    // test if the node is a ShapeNode instance
    if (!MindFusion.AbstractionLayer.isInstanceOfType(MindFusion.Diagramming.ShapeNode, node))
        continue;
    // check the shape id of the node here
    if (node.getShape().getId() == "...")
        // ....
} 



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 node
Reply #2 - Dec 29th, 2018 at 12:15pm
Print Post  
thank you
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint