Welcome to Kap Lab Store

Topic "Relayout and nodes positions"

3 Item(s)

per page
Is it possible to execute the relayout method preserving only some nodes positions?

What i'm trying to do is to draw some nodes at fixed positions and the others (unknown position) according the layout algorithm...

I've tried

var point:Point=new Point(x,y)
vis.addNodeElement(data, null, null, point, id)

It works fine, but when i call the relayout method the node is moved according to layout algorythm.
Any suggestion?

Thanks in advance.

Posted : 13 March 2014 11:46
You can exclude some nodes from the layout application by using the property ncludeInGraphLayout by setting it to false.
For example, to exclude all nodes from layout you can do like this :
//Exclude all existing nodes from the relayout call
for each ( var node:DiagramSprite in diagrammer.nodesMap )
   node.includeInGraphLayout = false;
I wish it helps you.
Posted : 13 March 2014 17:54
It worked!
Thank you
Posted : 14 March 2014 10:05

3 Item(s)

per page