documentationfor yFiles for HTML 2.6

OrientationLayout

OrientationLayout is a ILayoutStage that changes the orientation of the layout.

Inheritance Hierarchy
LayoutStageBase
OrientationLayout
Implemented Interfaces

Remarks

Layout Style

There are four orientations that can be used for a layout. These orientations can exist with or without mirroring at the x-axis or y-axis.

Changing the layout orientation is useful for layout styles that show a main direction.

TOP_TO_BOTTOM layout

BOTTOM_TO_TOP layout with mirroring

LEFT_TO_RIGHT layout

RIGHT_TO_LEFT layout

Concept

OrientationLayout performs three basic steps.

  1. Preparation: The sizes and locations of nodes and edge bends as well as labels and PortConstraints are transformed to the TOP_TO_BOTTOM orientation.
  2. Delegation: The core layout algorithm is invoked and calculates the layout for orientation TOP_TO_BOTTOM.
  3. Completion: The result of the core layout algorithm is rotated and mirrored to fit the desired layout orientation.

Features

OrientationLayout can either be used as a ILayoutStage wrapping a layout algorithm. Then it will change the orientation of the result of the core layout algorithm.

If no core layout algorithm is specified, OrientationLayout can work alone. It will just change the orientation of the layout without arranging nodes and edges.

Default Values of Properties

considerEdgeLabelstrueThe orientation of labels is handled by this .
coreLayoutnull
mirrorModeBOTTOM_TO_TOP
orientationTOP_TO_BOTTOM

Type Details

yfiles module
layout-core
yfiles-umd modules
All layout modules, view-layout-bridge
Legacy UMD name
yfiles.layout.OrientationLayout

See Also

For subclasses of MultiStageLayouts it is highly recommended to use orientationLayout for layout orientation changes and not to wrap MultiStageLayout with an OrientationLayout instance. That may cause unwanted artifacts.

Constructors

Properties

Methods