A SubgraphLayout is a ILayoutStage that filters out all graph elements that are not part of a specific subgraph.
Remarks
The nodes that induce this subgraph are marked using a IDataProvider registered with a specific subgraph nodes key. They will be arranged by the core layout algorithm.
Optionally, the edges that are included in the subgraph can explicitly be marked as well by registering a IDataProvider with the subgraph edges key. This feature is useful to exclude specific edges from being handled by the core layout. If no provider is registered, all edges are included.
Default Values of Properties
affectedEdgesDpKey | SUBGRAPH_EDGES_DP_KEY
| |
affectedNodesDpKey | AFFECTED_NODES_DP_KEY
| |
coreLayout | null |
Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.layout.SubgraphLayout
See Also
Constructors
Creates a new SubgraphLayout instance with an optional core layout algorithm.
Parameters
A map of options to pass to the method.
- coreLayout - ILayoutAlgorithm
- The core layout algorithm.
- affectedNodesDpKey - Object
The key to register a IDataProvider which marks the nodes that induce the subgraph to be arranged. This option sets the affectedNodesDpKey property on the created object.
- affectedEdgesDpKey - Object
The key to register a IDataProvider which marks the edges that are included in the subgraph, thus, visible during the core layout. This option sets the affectedEdgesDpKey property on the created object.
Properties
Gets or sets the key to register a IDataProvider which marks the edges that are included in the subgraph, thus, visible during the core layout.
Remarks
Default Value
SUBGRAPH_EDGES_DP_KEY.Throws
- Exception({ name: 'ArgumentError' })
- if the specified key is
null
- Exception({ name: 'ArgumentError' })
- if the specified key is
null
See Also
Gets or sets the key to register a IDataProvider which marks the nodes that induce the subgraph to be arranged.
Remarks
Default Value
AFFECTED_NODES_DP_KEY.Throws
- Exception({ name: 'ArgumentError' })
- if the specified key is
null
Gets or sets the core layout algorithm that is wrapped by this stage.
Methods
Delegates the arrangement of the specified subgraph of the given graph to the core layout algorithm.
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
See Also
Implements
Invokes the layout process of the core layout algorithm.
Remarks
Parameters
A map of options to pass to the method.
- graph - LayoutGraph
- the input graph
See Also
Defined in
Constants
A data provider key for marking edges that are included in the subgraph, thus, visible during the core layout.
Domain | Edge | |
Values | boolean | true if the edge should be included, false if it should be excluded and hidden during the core layout |