Skip to main content

Home > @jsplumbtoolkit/layout-hierarchical > HierarchicalLayoutParameters

HierarchicalLayoutParameters interface#

Parameters for the Hierarchical Layout.


export interface HierarchicalLayoutParameters extends AbstractHierarchicalLayoutParameters 

Extends: AbstractHierarchicalLayoutParameters


align?string(Optional) Optional, defaults to "center". Instructs the layout how to place child nodes with respect to their parent nodes. By default, a group of child nodes is centered on its parent. The layout also supports "start" and "end" for this value, which work in much the same way as "flex-start" and "flex-end" do in CSS: for a hierarchical layout with the root at the top of the tree and the child nodes underneath, a value of "start" for align would cause the first child of the root to be placed immediately under the root, with its first child immediately underneath, etc. The remainder of the content would fan out to the right. This option also works in conjunction with invert and orientation:"vertical"
invert?boolean(Optional) Optional, defaults to false. If true, the layout will be inverted, ie. the root node will be at the bottom for horizontal layouts, and to the right for vertical layouts
orientation?HierarchicalLayoutOrientation(Optional) Optional, defaults to "vertical". Valid values are "vertical" and "horizontal".
spacing?"compress" | "auto"(Optional) Optional, defaults to "auto". Valid values are: "auto" Spaces each node and its parent according to the size of the biggest node in the given node's level "compress" Uses a regular spacing between each node and its parent