Specifies different strategies for determining the size and arrangement of a TabularLayout.
Type Details
- yFiles module
- algorithms
Constants
Layout policy that automatically chooses the table size of the layout.
Remarks
The resulting table gets a dimension such that both row count and column count are similar, leading to a maximally square table with respect to the row and column count (actual node sizes are not considered). For example, given a graph with 14 nodes, a 4x4 grid will be created.
The nodes are arranged in the table in a row-wise fashion using the order provided by freeNodeComparator. If the comparison is null
and considerEdges is enabled, the algorithm applies a heuristic approach that leads to an arrangement of these nodes that has a low overall edge length.
See Also
Layout policy that adopts the size from an already registered LayoutGrid instance.
Remarks
The algorithm generates a tabular layout with the number of rows and columns as specified by the registered grid instance. The settings of the respective LayoutGridRows and LayoutGridColumns are considered.
Using this layout policy, it is possible to exactly define in which cell of the table a certain node should be placed by mapping a specific LayoutGridCellDescriptor to a node. LayoutGridCellDescriptor instances can be created using methods createCellDescriptor and createCellDescriptor. Multi-cells (see e.g. createCellSpanDescriptor) are not allowed. The node-cell mapping must be defined with layoutGridCellDescriptors.
Nodes without a specific mapping to a cell are inserted one after another in a row-wise manner in the order defined by the specified freeNodeComparator. If the comparison is null
and considerEdges is enabled, the algorithm applies a heuristic approach that leads to an arrangement of these nodes that has a low overall edge length.
See Also
Layout policy that uses the coordinates of the input graph to determine the table size and the mapping of the nodes to the cells.
Remarks
Enabling this feature, the current layout of the input graph will be interpreted as a sketch for the layout algorithm. Nodes are assigned to the same row if there exists a horizontal line that crosses through both of their bounds. Similarly, nodes are assigned to the same column if there exists a vertical line that crosses through both of their bounds. Clearly, this strategy only works smoothly if the given input already resembles a rough table arrangement.
If the given layout does not offer any division of the nodes into columns and rows or contains overlapping nodes, then the sketch is ambiguous and the algorithm will choose one valid variant.
See Also
Static Methods
Converts the given argument to an enum constant of this enum type.
Remarks
Parameters
A map of options to pass to the method.
- value - TabularLayoutMode
- The value to convert to an enum constant.
Returns
- ↪TabularLayoutMode
- The enum constant that corresponds to the given argument.
Returns the name of the given enum constant.
Parameters
A map of options to pass to the method.
- value - TabularLayoutMode
- The numeric value of an enum constant.
Returns
- ↪string
- The name of the enum constant.
Throws
- Exception({ name: 'Error' })
- If this type is a flags enums, and the provided value doesn't correspond to a single enum constant, or if this enum type contains no constant of the given numeric value.