Interactive Force Directed Layout During Dragging
As you drag a node around, the custom ForceDirectedLayout operates continuously, causing other nodes to be pushed aside or pulled along.
The graph is exactly the same as the Concept Map sample. But the node template is different, and the layout is different.
GoJS Features in this sample
Force Directed Layout
This predefined layout treats the graph as if it were a system of physical bodies with forces acting on and between them. The layout iteratively moves nodes and links to minimize the total sum of forces on each node. The resulting layout will normally not contain overlapping Nodes, excluding cases where the graph is densely interconnected. More information can be found in the GoJS learn pages.
Custom Layouts
GoJS allows for the creation of custom layouts to meet specific needs.
There are also many layouts that are extensions -- not predefined in the
go.js or go-debug.js library, but available as source code in
one of the three extension directories, with some documentation and corresponding
samples. More information can be found in the
GoJS learn pages.