A HierarchicLayoutSubcomponentDescriptor defines settings for subcomponents that are arranged by a different layout algorithm than their containing graph for HierarchicLayout.
Remarks
Property layoutAlgorithm defines the algorithm that is responsible for arranging the subcomponent. The placement policy specifies the integration into the main hierarchic layout.
Nodes mapped to the same HierarchicLayoutSubcomponentDescriptor instance form a component that is arranged as an independent sub-graph, induced by the component nodes. The mapping is retrieved from a IDataProvider registered with the input graph with key SUBCOMPONENT_DESCRIPTOR_DP_KEY. Components may not be nested, that is, a subcomponent is not allowed to contain nodes that belong to yet another subcomponent. Nesting of subcomponents results in an exception.
Default Values of Properties
layoutAlgorithm | null | |
placementPolicy | AUTOMATIC
| It is automatically determined how the subcomponent is placed. |
Type Details
- yfiles module
- layout-hierarchic
- yfiles-umd modules
- layout-familytree, layout-hierarchic, layout-radial, layout
- Legacy UMD name
- yfiles.layout.HierarchicLayoutSubcomponentDescriptor
See Also
Constructors
HierarchicLayoutSubcomponentDescriptor
(layoutAlgorithm?: ILayoutAlgorithm, placementPolicy?: HierarchicLayoutSubcomponentPlacementPolicy)Creates a new HierarchicLayoutSubcomponentDescriptor instance with the specified settings.
Parameters
A map of options to pass to the method.
- layoutAlgorithm - ILayoutAlgorithm
- The layout algorithm handling the layout of the graph induced by the subcomponent.
- placementPolicy - HierarchicLayoutSubcomponentPlacementPolicy
- The policy for placing the component into the layout context of the remaining graph.
Properties
Gets or sets the ILayoutAlgorithm for the subgraph that is induced by the nodes associated with this descriptor.
Default Value
null
.See Also
Sample Graphs
Gets or sets the policy defining how the subcomponent is placed within the layout context of the remaining graph.
Default Value
Throws
- Exception({ name: 'ArgumentError' })
- if an unknown placement policy is given.
See Also
Methods
Determines if there is a unique node outside the subcomponent whose removal would disconnect the component from the remaining graph and returns the node if it exists.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the graph containing the subcomponent.
Returns
- ↪YNode
- the only node outside the subcomponent with edges connecting to nodes within the subcomponent if such a node exists,
null
otherwise.