documentationfor yFiles for HTML 3.0.0.3

MultiPageLayout

This layout algorithm subdivides the input graph into several LayoutGraphs (called page graphs) such that the layout (calculated by the specified coreLayout) of each graph fits the maximumPageSize.

Inheritance Hierarchy
LayoutStageBase
MultiPageLayout
Implemented Interfaces

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).

The input graph.

The input graph is subdivided into two pages with size 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

additionalParentCount0No additional parent proxies are placed on a page.
elementFactoryMultiPageElementFactory
genericLabelingGenericLabelingA disabled instance with set to .
groupingPolicyALL_NODESSpecial nodes are also assigned to the associated groups.
layoutCallbacknullNo layout callback is set.
maximumPageSize1000x1000The width and height of the page are set to 1000.
multipleComponentsOnSinglePagetrueDifferent components may be placed on a single page.
stopDurationMAX_VALUEThe layout algorithm runs unrestricted.
strictClusterSeparationfalseNodes with different cluster IDs may be placed on the same page.
useProxyReferenceNodestrueThe algorithm creates proxy reference nodes.

Type Details

yFiles module
algorithms
This layout algorithm does not consider the initial drawing of the graph.
Client code is strongly recommended to apply the MultiPageLayout together with a MultiPageLayoutData<TNode,TEdge,TNodeLabel,TEdgeLabel>. Otherwise, client code must define unique IDs for the graph elements using the data keys NODE_ID_DATA_KEY, EDGE_ID_DATA_KEY, NODE_LABEL_ID_DATA_KEY, and EDGE_LABEL_ID_DATA_KEY before starting the layout.

Constructors

Properties

Methods

Constants