Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Set levels for the nodes (Read 2851 times)
liza
Full Member
***
Offline


I Love MindFusion!

Posts: 132
Joined: Apr 25th, 2019
Set levels for the nodes
May 1st, 2019 at 7:29am
Print Post  
Can I set levels of nodes ? So that I will always get the loaded diagram in the same state that I decide at the time of diagram creation
  
Back to top
AIM  
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Set levels for the nodes
Reply #1 - May 1st, 2019 at 7:51am
Print Post  
Save coordinates of node.getBounds() rectangle in your JSON data and restore them by calling setBounds() when loading.

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


I Love MindFusion!

Posts: 132
Joined: Apr 25th, 2019
Re: Set levels for the nodes
Reply #2 - May 1st, 2019 at 7:59am
Print Post  
Yes I did the same this by this I am getting the same shapes. But need to have same levels for example: If I created node on the left side of node-B and node-B is up side of node-C, Then while rendering back I should get them in the same order. Right now mindfusion is making bydefault order.
Please do the needful
  
Back to top
AIM  
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3435
Joined: Oct 19th, 2005
Re: Set levels for the nodes
Reply #3 - May 1st, 2019 at 9:06am
Print Post  
Do you mean some layout class you apply is reordering them? If you'll be saving node positions, you shouldn't have to apply layout classes after loading. If you prefer to apply layouts, make sure you reload the nodes and links arrays in same order they were in when saving.

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