- I
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.
See Also
Developer's Guide
API
- ports, sourcePortGroupIds
Members
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
childPlaceris 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
Implements
ISubtreePlacer.createProcessordetermineChildConnectors
(localRoot: LayoutNode, connectorMap: IMapper<LayoutNode, ParentConnectorDirection>)Delegates to the ISubtreePlacer responsible for arranging the nodes in one cluster.
determineChildConnectors
(localRoot: LayoutNode, connectorMap: IMapper<LayoutNode, ParentConnectorDirection>)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
Implements
ISubtreePlacer.determineChildConnectorsPlaces the clusters of SubtreeShapes according to their port group ids.
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