Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic Fractal layout, displaying subordinate nodes clockwise (Read 1033 times)
danesh
YaBB Newbies
*
Offline


I Love MindFusion!

Posts: 19
Joined: Aug 9th, 2021
Fractal layout, displaying subordinate nodes clockwise
Nov 1st, 2021 at 3:09pm
Print Post  
Hi,

Iam using the fractal layout currently like this:

Code (Javascript)
Select All
var layout = {
	fractal: new MindFusion.Graphs.FractalLayout()
}

layout.fractal.root = diagram.nodes[0];
diagram.arrange(layout.fractal); 



Does the fractal layout have a behaviour where child nodes are displayed around the parent node in a clockwise fashion?

By 'clockwise fashion' I mean in the order that nodes are added to the diagram using diagram.addItem(); as I am looping over some nodes and adding them to the diagram but as soon as I arrange them using fractal layout, they are placed in a random order around the parent.

Thank you

Kind regards
Danesh
  
Back to top
 
IP Logged
 
Slavcho
YaBB Moderator
*****
Offline


tech.support

Posts: 3147
Joined: Oct 19th, 2005
Re: Fractal layout, displaying subordinate nodes clockwise
Reply #1 - Nov 1st, 2021 at 3:45pm
Print Post  
Hi,

From what I remember, you build the library yourself from source code - try replacing childCircles.sort(compareRadius) call in FractalLayout.js with your own sort criteria. Alternatively, if you comment that line out, it should use the order of links from parent to child nodes.

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