A GridComponentDescriptor defines settings for edges routed on a common bus in a grid-like subcomponent for HierarchicalLayout.
Remarks
Edges mapped to the same GridComponentDescriptor instance, adjacent to a common root node and having the same edge direction form a bus along which the nodes are placed in a grid-like style. The mapping is defined using property gridComponents.
Default Values of Properties
maximumNodesAfterBus | 0 | If the maximum number of nodes before the bus is 0 too, then the number of nodes is unrestricted, otherwise all nodes are placed before the bus. |
maximumNodesBeforeBus | 0 | If the maximum number of nodes after the bus is 0 too, then the number of nodes is unrestricted, otherwise all nodes are placed after the bus. |
Type Details
- yFiles module
- algorithms
See Also
Constructors
Parameters
A map of options to pass to the method.
- maximumNodesBeforeBus - number
- The maximum number of nodes in a layer that are placed before the common bus segment. This option sets the maximumNodesBeforeBus property on the created object.
- maximumNodesAfterBus - number
- The maximum number of nodes in a layer that are placed after the common bus segment. This option sets the maximumNodesAfterBus property on the created object.
Properties
Gets or sets the maximum number of nodes in a layer that are placed after the common bus segment.
Remarks
0
which means that the nodes are evenly distributed and the common bus segment is placed in the middle. The actual number of nodes before and after the bus is determined automatically in that case.Default Value
0
.If the maximum number of nodes before the bus is 0
too, then the number of nodes is unrestricted, otherwise all nodes are placed before the bus.
Property Value
Throws
- Exception({ name: 'ArgumentError' })
- if the given node count is negative
Sample Graphs
0
, then the maximum will be exceeded as necessary. The maximum can also be exceeded if there are too many fixed nodes in the same layer (when running in incremental mode) or when grid layers are user-specified via gridComponentRootOffsets.Gets or sets the maximum number of nodes in a layer that are placed before the common bus segment.
Remarks
0
which means that the nodes are evenly distributed and the common bus segment is placed in the middle. The actual number of nodes before and after the bus is determined automatically in that case.Default Value
0
.If the maximum number of nodes after the bus is 0
too, then the number of nodes is unrestricted, otherwise all nodes are placed after the bus.
Property Value
Throws
- Exception({ name: 'ArgumentError' })
- if the given node count is negative
Sample Graphs
0
, then the maximum will be exceeded as necessary. The maximum can also be exceeded if there are too many fixed bus nodes in the same layer (when running in incremental mode) or when bus layers are user-specified via gridComponentRootOffsets.Constants
A data key for assigning nodes to a specific side of the common bus.
Remarks
If no IMapper<K,V> is specified with this key, the nodes will be placed in an alternating way.
Assign true
to a node if it should be placed before the bus, or false
if it should be placed after the bus.
See Also
A data key for assigning nodes to specific layers relative to the root node of the grid component.
Remarks
An offset value i
specified for a node is interpreted relative to the root node as follows, assuming that the root node is in layer x
.
- If the grid component is placed in the layers after the root, the node will be placed in layer
x + i
- If the grid component is placed in the layers before the root, the node will be placed in layer
x - i
Assign an integer value greater than or equal to 1
to a node for representing its layer offset with respect to the layer of the root node of the grid component that this node belongs to.
See Also
2
, 10
, 15
are normalized to 1
, 2
, 3
).