Skip to main content

Home > @jsplumbtoolkit/layout-hierarchy

layout-hierarchy package

Classes

ClassDescription
AssignLayersStage
CrossingStage
HierarchyLayout

A new version of a hierarchy layout, which can better handle upstream links and multiple parents. This layout runs in 3 stages -

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

HierarchyLayoutStage
PlacementStageThe final stage of the layout, in which vertices are placed, according to the layers and the ordering within the layers that has been computed by the previous stages. Several different placement strategies are supported - each layer can be aligned to the start/end of the layer, or to the center of the layout, and the relativeToParent strategy attempts to group children of some given vertex underneath that vertex.

Enumerations

EnumerationDescription
HierarchyLayoutAxisValues
PlacementStageStrategyValues

Functions

FunctionDescription
isEdgeNode(entry)

Interfaces

InterfaceDescription
CrossingStageOptions
EdgeNode
EntryNode
HierarchyLayoutEdgeNodeEntry
HierarchyLayoutParametersOptional parameters for a Hierarchy layout
ResultSet

Type Aliases

Type AliasDescription
Crossings
EnhancedCrossing
EnhancedCrossings
HierarchyLayoutAxis
HierarchyLayoutOrdering
PlacementStageStrategy