- I
- I
Remarks
The algorithm adds special nodes to guarantee that no information is lost when splitting edges that connect nodes placed on different pages (for more details take a look at the concept described below).
500x500. Circular nodes denote the so-called CONNECTORs that split edges to nodes placed on other pages. The label of a connector corresponds to that of the opposite node of the split edge.
Layout Style
This multi-page layout algorithm subdivides the input graph into several smaller ones and applies existing layout algorithms to each of them. Hence, its layout style heavily depends on the selected coreLayout used for each single page. Furthermore, the algorithm uses several refinement steps to produce more compact results.
Features
Similar to the layout style, the supported feature set mainly depends on the features supported by the specified coreLayout. Note that due to the underlying approach of the MultiPageLayout it doesn't support LayoutGrids. Furthermore, while the MultiPageLayout is able to support groups (see groupingPolicy), it doesn't support edges incident to group nodes.
Concept
To guarantee that no information is lost, this layout algorithm replaces edges between nodes on different pages by so-called CONNECTOR nodes. Furthermore, it may replicate nodes (the clones are called PROXY nodes) and insert special nodes to refer to such nodes (so-called PROXY_REFERENCE nodes).
Unlike other yFiles layout algorithms, MultiPageLayout does not modify its input graph but returns its result as a MultiPageLayoutResult. To be able to weight as much as possible from existing layout support, this layout algorithm implements the ILayoutAlgorithm interface, although method applyLayoutImpl does not specify a return value. Therefore, client code has to set a layoutCallback that is invoked when the algorithm has calculated a new multi-page result.
Default Values of Properties
| Name | Default | Description |
|---|---|---|
| additionalParentCount | 0 | No additional parent proxies are placed on a page. |
| coreLayout | null | |
| elementFactory | MultiPageElementFactory | |
| genericLabeling | GenericLabeling | A disabled instance with stopDuration set to ZERO. |
| groupingPolicy | MultiPageGroupingPolicy.ALL_NODES | Special nodes are also assigned to the associated groups. |
| layoutCallback | null | No layout callback is set. |
| maximumPageSize | 1000x1000 | The width and height of the page are set to 1000. |
| multipleComponentsOnSinglePage | true | Different components may be placed on a single page. |
| stopDuration | TimeSpan.MAX_VALUE | The layout algorithm runs unrestricted. |
| strictClusterSeparation | false | Nodes with different cluster IDs may be placed on the same page. |
| useProxyReferenceNodes | true | The algorithm creates proxy reference nodes. |
See Also
Developer's Guide
Members
Constructors
Creates a new MultiPageLayout instance.
Parameters
- coreLayout?: ILayoutAlgorithm
- the layout algorithm used for a single page
Properties
Gets or sets the number of additional tree parent proxies that the algorithm tries to place on a page.
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the given additional parent count is negative
Default Value
Gets or sets the core ILayoutAlgorithm that is wrapped by this stage.
Property Value
Default Value
Defined in
LayoutStageBase.coreLayoutGets or sets a value that determines whether this stage should do anything but execute the coreLayout.
By default, when constructed, stages should be enabled. Users may disable a stage's functionality by setting this property to false.
Stages that can guarantee that the graph will not change can choose to not even execute the coreLayout when disabled.
Defined in
LayoutStageBase.enabledGets the labeling algorithm that places the labels of the input graph.
Property Value
Default Value
See Also
Gets or sets how to handle special nodes (like connector and proxy nodes) with respect to groups.
Property Value
Default Value
See Also
Gets or sets a callback that is notified upon completion of multi-page layout calculation.
Property Value
Default Value
See Also
Developer's Guide
Gets or sets the maximum size of a single page.
The layout algorithm subdivides the input graph such that each part is placed on a different page that fits the specified maximum size.
Both the specified width and height have to be positive.
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the specified width or height is not positive
Default Value
1000.Sample Graphs
Size 250x250
The whole graph fits onto a single page.
See Also
Developer's Guide
API
- stopDuration
Gets or sets the policy for defining which multi-edges may share a connector node.
Default Value
See Also
API
- CONNECTOR
Property Value
true if different connected components may be placed on a single page, false otherwiseDefault Value
Gets or sets the preferred time limit for the layout algorithm.
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the preferred time limit is negative
Default Value
See Also
Developer's Guide
Gets or sets whether or not the algorithm should separate nodes with different cluster IDs.
Property Value
true if the algorithm separates nodes with different cluster IDs, false otherwiseDefault Value
See Also
Gets or sets whether or not the algorithm should create PROXY_REFERENCE nodes.
Property Value
true if the algorithm creates proxy reference nodes, false otherwiseDefault Value
See Also
API
- PROXY_REFERENCE, PROXY
Methods
Implementation of the ILayoutAlgorithm interface and main entry point for the layout calculation.
Parameters
- graph: LayoutGraph
- The graph to apply the layout to.
Defined in
LayoutStageBase.applyLayoutCalculates a new multi-page layout for the specified graph.
Parameters
- graph: LayoutGraph
- the input graph
Throws
- Exception ({ name: 'ArgumentError' })
- if no unique ids are defined with NODE_ID_DATA_KEY, EDGE_ID_DATA_KEY, NODE_LABEL_ID_DATA_KEY, or EDGE_LABEL_ID_DATA_KEY.
Overrides
LayoutStageBase.applyLayoutImplcreateLayoutData
(graph: LayoutGraph): MultiPageLayoutData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel>Returns an instance of LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to perform item-specific configurations for the MultiPageLayout.
createLayoutData
(graph: LayoutGraph): MultiPageLayoutData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel>Parameters
- graph: LayoutGraph
- the graph that determines the generic type arguments of the created layout data
Return Value
- MultiPageLayoutData<LayoutNode, LayoutEdge, LayoutNodeLabel, LayoutEdgeLabel>
- an instance of layout data that can be used to perform item-specific configurations for the given MultiPageLayout.
Returns an instance of LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> that can be used to perform item-specific configurations for the MultiPageLayout.
LayoutExecutor type is available at runtime.Parameters
- graph?: IGraph
- the graph that determines the generic type arguments of the created layout data
Return Value
- MultiPageLayoutData<INode, IEdge, ILabel, ILabel>
- an instance of layout data that can be used to perform item-specific configurations for the given MultiPageLayout.
See Also
Developer's Guide