Layout Features Tutorial
Incremental Organic Layout
This demo shows how to run the
Organic Layout
algorithm on a predefined subset of nodes in a graph.
To achieve this, two setup steps are necessary:
First, the algorithm has to be told to work on a subset only. To do so,
OrganicLayout
's
scope
property has to be set to one of the subset scopes
MAINLY_SUBSET
,
MAINLY_SUBSET_GEOMETRIC
, or
SUBSET
.
And second, the algorithm has to be told which set of nodes to rearrange. Class
OrganicLayoutData
offers the property
affectedNodes
for this purpose.
In this demo, the algorithm works on the
SUBSET
of
turquoise nodes
only.
Code Snippet
You can copy the code snippet to configure the layout from
GitHub
.
Documentation
The Developer's Guide has detailed information about the
organic layout algorithm
in general and about
how to run the algorithm on a subset of nodes
specifically.