documentationfor yFiles for HTML 3.0.0.2

SingleSplitSubtreePlacer

SingleSplitSubtreePlacer delegates the arrangement of the children to two different ISubtreePlacers.

Inheritance Hierarchy
SingleSplitSubtreePlacer
Implemented Interfaces

Remarks

Layout Style

This ISubtreePlacer can, for example, be used for creating mind maps or a playing schedule of a sports competition.

There are two subtrees that are placed above and below the root; both subtrees consist of two subtrees that are placed left and right of their local root

Usage

The SingleSplitSubtreePlacer is designed to create two subtree layouts on opposite sides of a common root node. It delegates the arrangement of child nodes to two different ISubtreePlacers, known as the primary and secondary subtree placers. The child nodes are partitioned into primary and secondary sets, either automatically or as defined by the user via singleSplitSubtreePlacerPrimaryNodes. The primary child nodes are arranged as a subtree by the primary subtree placer, with its root positioned at the original root node. Similarly, the secondary child nodes are arranged as a subtree by the secondary subtree placer, also with its root positioned at the original root node. To avoid overlaps between the two subtree layouts, the primary and secondary subtree placers must be configured accordingly. For example, they can be configured such that the subtrees lie on opposite sides.

Default Values of Properties

Examples

Configuration of a single split subtree placer placing the primary subtree and secondray subtree on opposite sides.
const leftLevelAlignedSubtreePlacer = new LevelAlignedSubtreePlacer()
leftLevelAlignedSubtreePlacer.transformation =
  SubtreeTransform.ROTATE_LEFT

const rightLevelAlignedSubtreePlacer = new LevelAlignedSubtreePlacer()
rightLevelAlignedSubtreePlacer.transformation =
  SubtreeTransform.ROTATE_RIGHT

const subtreePlacer = new SingleSplitSubtreePlacer({
  primaryPlacer: leftLevelAlignedSubtreePlacer,
  secondaryPlacer: rightLevelAlignedSubtreePlacer,
})

Type Details

yFiles module
algorithms

See Also

Constructors

Properties

Methods

Constants