Abstract base class implementing ILayoutStage that handles the management of the coreLayout.
Inheritance Hierarchy
LayoutStageBase
Implemented Interfaces
Remarks
Subclasses of this stage can use the provided methods, such that the management of the coreLayout and the enabled state do not need to be considered explicitly.
Default Values of Properties
coreLayout | null |
Type Details
- yFiles module
- algorithms
See Also
Constructors
Initializes a new LayoutStageBase instance.
Remarks
This constructor will only be called by subclasses and optionally initializes the coreLayout field.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- coreLayout - ILayoutAlgorithm
- The core layout algorithm. The default value is
null
. - enabled - boolean
Properties
Gets or sets the core ILayoutAlgorithm that is wrapped by this stage.
Default Value
The default value is
null
.Property Value
the core layout routine
See Also
Implements
Gets or sets a value that determines whether this stage should do anything but execute the coreLayout.
Remarks
By default, when constructed, stages should be enabled. Users may disable a stage's functionality by setting this property to false
.
Stages that can guarantee that the graph will not change can choose to not even execute the coreLayout when disabled.
See Also
Renamed, Moved, and Removed Classes and Members,
Renamed, Moved, and Removed Classes and Members,
Renamed, Moved, and Removed Classes and Members,
Renamed, Moved, and Removed Classes and Members,
Renamed, Moved, and Removed Classes and Members,
Renamed, Moved, and Removed Classes and Members,
Renamed, Moved, and Removed Classes and Members
Implements
Methods
Implementation of the ILayoutAlgorithm interface and main entry point for the layout calculation.
Remarks
This implementation checks the enabled state and when it's not enabled, will delegate to the coreLayout, directly. When the stage is enabled, all the work will be delegated to applyLayoutImpl, instead.
Parameters
options - Object
A map of options to pass to the method.
A map of options to pass to the method.
- graph - LayoutGraph
- The graph to apply the layout to.
See Also
Migrating from Synchronous to Asynchronous Layout Calculation,
Using Buffered Layout,
Writing a Custom Layout Stage
Implements
Abstract method that performs the actual implementation when the stage is enabled
Remarks
Subclasses don't need to check the enabled field, because applyLayout will only invoke this method on enabled instances. Implementations should call applyLayout of the coreLayout between pre- and postprocessing steps as appropriate for the stage. applyLayout only invokes the core algorithm when the stage is disabled.