- I
- I
Remarks
This ILayoutStage supports both wrapping a layout at a given width (height) and wrapping a layout automatically at some width (height) such that the resulting overall aspect ratio is close to a desired targetRatio.
The LineWrappingStage can be used on an existing graph layout or on the result of the coreLayout.
Default Values of Properties
| Name | Default | Description |
|---|---|---|
| columnMode | false | The layout is wrapped horizontally, producing rows. |
| coreLayout | null | |
| edgeSpacing | 5 | |
| fixedWidthLineBreaks | false | The target aspect ratio defines how the line width is chosen. |
| mirror | true | Every other line is mirrored. |
| spacing | 10 | |
| targetRatio | 1 |
See Also
Developer's Guide
Members
Constructors
Creates a new LineWrappingStage instance with default settings.
Parameters
Properties
Gets or sets whether this ILayoutStage wraps lines/rows or columns.
If this mode is enabled, the layout is wrapped vertically and new columns are appended to the right of the first column. Otherwise, the layout is wrapped horizontally and new rows are appended below the first row.
Also, the fixedWidth property will be interpreted as a fixed height if this mode is enabled.
Property Value
true for column wrapping mode, false for row wrappingDefault Value
See Also
Developer's Guide
API
- fixedWidth
Gets or sets the core ILayoutAlgorithm that is wrapped by this stage.
Property Value
Default Value
Defined in
LayoutStageBase.coreLayoutProperty Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the given spacing is a negative value
Default Value
Sample Graphs
5See Also
Developer's Guide
Gets or sets a value that determines whether this stage should do anything but execute the coreLayout.
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.
Defined in
LayoutStageBase.enabledThe LineWrappingStage breaks the lines at the specified width.
In columnMode, the fixed width is interpreted as fixed height for a column.
true.Property Value
Default Value
Sample Graphs
500See Also
Developer's Guide
API
- fixedWidthLineBreaks, columnMode
Gets or sets whether the algorithm should use the fixedWidth or target aspect ratio to determine line breaks.
Property Value
true if a fixed line width is used, false otherwiseDefault Value
See Also
Developer's Guide
API
- fixedWidth, targetRatio
180 degrees. Then, the edges connecting both lines stay short. In case the remainder is not rotated, the edges are routed between the two lines to connect to the front of the non-mirrored line.Property Value
true if every second line is rotated by 180 degrees, false otherwiseDefault Value
Sample Graphs
falseSee Also
Developer's Guide
If the columnMode is enabled, this spacing defines the distance between adjacent columns.
The spacing should be non-negative.
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the spacing is negative
Default Value
Sample Graphs
10See Also
Developer's Guide
0.false.Property Value
width/heightThrows
- Exception ({ name: 'ArgumentError' })
- if the target ratio is
0or less
Default Value
Sample Graphs
0.5See Also
Developer's Guide
API
- fixedWidthLineBreaks
Methods
Implementation of the ILayoutAlgorithm interface and main entry point for the layout calculation.
Parameters
- graph: LayoutGraph
- The graph to apply the layout to.