documentationfor yFiles for HTML 3.0.0.3

OrientationStage

OrientationStage is an ILayoutStage that changes the orientation of the layout.

Inheritance Hierarchy
LayoutStageBase
OrientationStage
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

OrientationStage performs three basic steps.

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

Features

OrientationStage is used as an ILayoutStage wrapping an ILayoutAlgorithm. Then it will change the orientation of the result of the coreLayout.

Default Values of Properties

coreLayoutnull
edgeLabelPlacementCONSIDERThe orientation of labels is handled by this .
mirroredOrientationsBOTTOM_TO_TOP
orientationTOP_TO_BOTTOM

Type Details

yFiles module
algorithms
Most ILayoutAlgorithms have a property to set the LayoutOrientation. It is highly recommended to use these properties rather than wrap an extra OrientationStage instance. This may cause unwanted artifacts.

Constructors

Properties

Methods