This class implements the layering phase of the HierarchicalLayout (i.e., assignment of the nodes to layers).
Remarks
It uses topological sorting to assign layers to the nodes.
Default Values of Properties
rerankingPolicy | NONE
| layers are not reranked |
Type Details
- yFiles module
- algorithms
Constructors
Creates a new instance of TopologicalLayerAssigner with default settings.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- rerankingPolicy - LayerRerankingPolicy
- The policy for reranking the layers used by this TopologicalLayerAssigner instance. This option sets the rerankingPolicy property on the created object.
Properties
Gets or sets the policy for reranking the layers used by this TopologicalLayerAssigner instance.
Default Value
Property Value
one of the predefined reranking policies
Methods
Assigns all nodes of the graph to layers and adds them to the layers in the given layoutContext
.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- graph - LayoutGraph
- The input graph
- layoutContext - HierarchicalLayoutContext
- The HierarchicalLayoutContext used for querying information about the nodes and edges