The AssistantSubtreePlacer places nodes that are marked as assistants left and right of their parents and all other nodes below the assistant nodes.
Implements
Inheritance Hierarchy
Remarks
Layout Style
Concept
This ISubtreePlacer delegates the placement of all assistant nodes to an instance of LeftRightSubtreePlacer. The non-assistant nodes are handled by another subtree placer. To be able to do this, AssistantSubtreePlacer uses an ISubtreePlacerProcessor which prepares the graph for node placing.
Nodes can be defined as assistant nodes with TreeLayoutData.assistantNodes<TNode, TEdge, TNodeLabel, TEdgeLabel>.
Default Values of Properties
| Name | Default | Description |
|---|---|---|
| childSubtreePlacer | SingleLayerSubtreePlacer | A SingleLayerSubtreePlacer with median root alignment, orthogonal edge routing style, and no transformation matrix applied. |
| spacing | 20 |
See Also
Developer's Guide
Members
Show:
Constructors
Creates a new AssistantSubtreePlacer instance.
Creates a new AssistantSubtreePlacer instance.
Parameters
Properties
Gets or sets the ISubtreePlacer instance that places the non-assistant children.
Gets or sets the ISubtreePlacer instance that places the non-assistant children.
These non-assistant child nodes will be placed below the assistant child nodes and are arranged by the given ISubtreePlacer. Non-assistant child nodes are the ones that are not defined with TreeLayoutData.assistantNodes<TNode, TEdge, TNodeLabel, TEdgeLabel>.
Using CompactSubtreePlacer as placer for non-assistant children is not supported. Instead, CompactSubtreePlacer itself allows to define assistant nodes and in that case places subtrees using the same style as AssistantSubtreePlacer does.
final
Property Value
the child subtree placer for the non-assistant children
Throws
- Exception ({ name: 'ArgumentError' })
- if the given child placer is
nullor an instance of class CompactSubtreePlacer.
Default Value
The default value is: SingleLayerSubtreePlacer
A SingleLayerSubtreePlacer with median root alignment, orthogonal edge routing style, and no transformation matrix applied.
See Also
Developer's Guide
API
- assistantNodes
Gets or sets the spacing between subtrees for the delegate ISubtreePlacer.
Gets or sets the spacing between subtrees for the delegate ISubtreePlacer.
The spacing needs to be non-negative.
final
Property Value
the distance between subtrees
Throws
- Exception ({ name: 'ArgumentError' })
- if the given spacing is negative
Default Value
The default value is: 20
Sample Graphs
Shown Setting: Spacing
20 using SingleLayerSubtreePlacerGets the modification matrix that defines the direction of the subtree.
Gets the modification matrix that defines the direction of the subtree.
conversionfinal
Property Value
the modification matrix
Default Value
The default value is: SubtreeTransform.NONE
Methods
Creates an edge comparison which takes the initial coordinates of the nodes into account.
Creates an edge comparison which takes the initial coordinates of the nodes into account.
This comparison defines the order of the outgoing edges of a node before the actual placement of the node's subtree is calculated.
The from-sketch comparison functions of the LeftRightSubtreePlacer and childSubtreePlacer are combined into a compound function.
final
Return Value
- function(LayoutEdge, LayoutEdge): number
- the comparison for the edges
Function Details
Encapsulates a method that compares two objects.Parameters- x: LayoutEdge
- The first object to compare.
- y: T
- The second object to compare.
Return Value- number
- An integer value which is
<0ifxis less thany,0ifxis equal toy, or>0ifxis greater thany
final
Parameters
- treeLayout: TreeLayout
- graph: LayoutGraph
- currentRoot: LayoutNode
Return Value
- ISubtreePlacerProcessor | null
determineChildConnectors
(localRoot: LayoutNode, connectorMap: IMapper<LayoutNode, ParentConnectorDirection>)
determineChildConnectors
(localRoot: LayoutNode, connectorMap: IMapper<LayoutNode, ParentConnectorDirection>)final
Parameters
- localRoot: LayoutNode
- connectorMap: IMapper<LayoutNode, ParentConnectorDirection>
final
Parameters
- nodeShapeProvider: IMapper<LayoutNode, SubtreeShape>
- subtreeShapeProvider: IMapper<LayoutNode, SubtreeShape>
- graph: LayoutGraph
- localRoot: LayoutNode
- parentConnectorDirection: ParentConnectorDirection
Return Value
Constants
All constants are filtered. Go to Filters.