This class is used by TabularLayout to provide placement details for nodes during the layout process.
Remarks
It allows to configure layout settings individually for each node of the input graph.
A TabularLayoutNodeLayoutDescriptor can be specified individually for single nodes using a IDataProvider that returns a descriptor instance for the node, or null
if no individual descriptor is bound to a node. In the latter case, the default descriptor is used. The IDataProvider must be registered with the graph with key NODE_LAYOUT_DESCRIPTOR_DP_KEY.
Default Values of Properties
horizontalAlignment | 0.5 | The node is center-aligned in its column. |
verticalAlignment | 0.5 | The node is center-aligned in its row. |
Type Details
- yfiles module
- layout-core
- yfiles-umd modules
- All layout modules, view-layout-bridge
- Legacy UMD name
- yfiles.layout.TabularNodeLayoutDescriptor
See Also
Constructors
Creates a new instance of a TabularLayoutNodeLayoutDescriptor with the default values.
Parameters
A map of options to pass to the method.
- verticalAlignment - number
The vertical alignment of the node within its row. This option sets the verticalAlignment property on the created object.
- horizontalAlignment - number
The horizontal alignment of the node within its column. This option sets the horizontalAlignment property on the created object.
Properties
Gets or sets the horizontal alignment of the node within its column.
Remarks
All nodes of the same column will be aligned according to their horizontal alignment setting.
- A value of
0.0
corresponds to left-alignment. - A value of
0.5
corresponds to center-alignment. - A value of
1.0
corresponds to right-alignment.
The horizontal alignment value must be within [0,1]
.
Default Value
0.5
.The node is center-aligned in its column.
Throws
- Exception({ name: 'ArgumentError' })
- if the given value is not within interval
[0,1]
Sample Graphs
Gets or sets the vertical alignment of the node within its row.
Remarks
All nodes of the same row will be aligned according to their vertical alignment setting.
- A value of
0.0
corresponds to top-alignment. - A value of
0.5
corresponds to center-alignment. - A value of
1.0
corresponds to bottom-alignment.
The vertical alignment value must be within [0,1]
.
Default Value
0.5
.The node is center-aligned in its row.
Throws
- Exception({ name: 'ArgumentError' })
- if the given value is not within interval
[0,1]
Sample Graphs
Methods
Creates a copy of this descriptor instance.
Returns
- ↪TabularLayoutNodeLayoutDescriptor
- a copy of this descriptor instance