Home > @jsplumbtoolkit/layout-hierarchy > HierarchyLayout
HierarchyLayout class
A new version of a hierarchy layout, which can better handle upstream links and multiple parents. This layout runs in 3 stages -
- placement of nodes into layers 2. reordering nodes in layers to minimise edge crossing 3. placement of nodes into final layout
In step (3) all nodes are currently centered around the midpoint of the chart, as opposed to being grouped below their parent; it is possible a future enhancement of this could offer the aligned on parent option but since multiple parents is one of the expected conditions for use for this layout it doesn't always make sense to align on the parent - the question being, which parent? update, 9/12/21 - i think it needs to be the midpoint of parents in the layer directly above.
Note also this layout currently ignores Ports. And probably Groups.
Signature:
export declare class HierarchyLayout extends AbsoluteBackedLayout<HierarchyLayoutParameters>
Extends: AbsoluteBackedLayout<HierarchyLayoutParameters>
Constructors
Constructor | Modifiers | Description |
---|---|---|
(constructor)(params) | Constructs a new instance of the HierarchyLayout class |
Properties
Property | Modifiers | Type | Description |
---|---|---|---|
axis | number | ||
defaultMagnetized | boolean | ||
edgeNodeSize | number | ||
gatherUnattachedRoots | boolean | ||
invert | boolean | ||
maxIterations | number | ||
maxIterationsWithoutImprovement | number | ||
model | HierarchyLayoutModel | ||
oAxis | number | ||
placementStrategy | PlacementStageStrategy | ||
respectEdgeDirection | boolean | ||
resultSets | Array<ResultSet> | ||
rootNode | AbstractEdgeTerminus | ||
type | string | ||
type | static | string | |
unattachedRootPadding | number |
Methods
Method | Modifiers | Description |
---|---|---|
begin(toolkit, parameters) | ||
canMagnetize(id) | ||
end(toolkit, parameters, wasMagnetized) | ||
getDefaultParameters() | ||
reset() | ||
setRootNode(node) | ||
step() |