C

MultiSplitSubtreePlacer

This ISubtreePlacer splits the children of a local root into clusters based on port groups defined on the edges to the children - the placement of the cluster content and the placement of clusters themselves is delegated to other ISubtreePlacers.
ImplementsInheritance Hierarchy

Remarks

The clusters are determined by the port grouping of the edges that connect the children to its root. Port group ids are defined using the TreeLayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> property ports.

The placement of the clusters themselves is specified by a ISubtreePlacer which will consider clustered children like one child node of the local root that this placer is responsible for. The content of the clusters, i.e., the children are placed by another ISubtreePlacer. Both instances are provided in the constructor.

There are three port groups whose target nodes are placed above each other

See Also

Developer's Guide

API

ports, sourcePortGroupIds

Members

No filters for this type

Constructors

Creates a new MultiSplitSubtreePlacer instance.

Parameters

clusterPlacer: ISubtreePlacer
the ISubtreePlacer which places the clusters with respect to the local root node this placer is responsible for, treating each cluster like a node
childPlacer: ISubtreePlacer
the ISubtreePlacer which places the children within their cluster. Must not be of type MultiSplitSubtreePlacer.

Throws

Exception ({ name: 'ArgumentError' })
If one of the given placers is null.
Exception ({ name: 'ArgumentError' })
If the given childPlacer is of type MultiSplitSubtreePlacer

Methods

Creates an ISubtreePlacerProcessor that prepares the graph for splitting children into multiple clusters based on port grouping.

In a pre-processing step, the ISubtreePlacerProcessor inserts a helper node for each port group and connects it to the local root and the edges of the according group. The child subtree placer is assigned to those helper nodes and will arrange them during the layout calculation.

The changes to the graph are restored in a post-processing step.

Parameters

treeLayout: TreeLayout
the current TreeLayout instance
graph: LayoutGraph
the input graph
currentRoot: LayoutNode
the root node handled by this ISubtreePlacer

Return Value

ISubtreePlacerProcessor
the ISubtreePlacerProcessor responsible for preparing the graph
Delegates to the ISubtreePlacer responsible for arranging the nodes in one cluster.
final

Parameters

localRoot: LayoutNode
the local root node
connectorMap: IMapper<LayoutNode, ParentConnectorDirection>
the IMapper<K, V> that is used for storing the direction specifiers of the child nodes
Places the clusters of SubtreeShapes according to their port group ids.
final

Parameters

nodeShapeProvider: IMapper<LayoutNode, SubtreeShape>
the IMapper<K, V> for obtaining an initial shape of the root node
subtreeShapeProvider: IMapper<LayoutNode, SubtreeShape>
the IMapper<K, V> for accessing the pre-calculated shapes of the subtrees
graph: LayoutGraph
The input graph
localRoot: LayoutNode
The root of the subtree that should be arranged by this method
parentConnectorDirection: ParentConnectorDirection
The direction specifier for the connector of the local root node to its parent node

Return Value

SubtreeShape
The merged SubtreeShapes of the local root and its children