Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

Node Alignment

This demo shows how to automatically align nodes in rows and columns using the AlignmentStage layout algorithm.

The AlignmentStage assigns nodes to rows and columns and places all nodes in a column/row centered on a vertical/horizontal line. Two nodes belong to the same column/row, if the horizontal/vertical distance between the centers of said nodes is less than or equal to the value of the snapDistance property.

When aligning nodes, the horizontal distance between nodes in a shared row and the vertical distance between nodes in a shared column can only increase. As a result, reducing the minimumNodeDistance will not move existing rows and columns closer together.