- I
Remarks
Nodes whose bounds overlap in the main layout direction are assigned to the same layer. To influence to which amount the boxes need to overlap, the nodes can temporarily be scaled. Alternatively, a minimum and maximum size or margins can be specified for the nodes.
Default Values of Properties
| Name | Default |
|---|---|
| maximumNodeSize | Number.MAX_VALUE |
| minimumNodeSize | 0.0 |
| nodeMargin | 0.0d |
| nodeScalingFactor | 1.0 |
See Also
Developer's Guide
Members
Constructors
Creates an instance of FromSketchLayerAssigner with default settings.
Parameters
Properties
This can be used for more fuzzy layering.
The maximum size can take positive values.
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the specified value is less than
0
Default Value
Sample Graphs
See Also
This can be used for more fuzzy layering.
The minimum size can take positive values.
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the specified value is less than
0
Default Value
Sample Graphs
See Also
If the value of the margin is positive, it specifies a border around a node. In case it is negative, it is considered as an inset that defines a smaller area inside the node.
This can be used for more fuzzy layering.
Property Value
Default Value
Sample Graphs
See Also
Nodes are being scaled from their center. This can be used for more fuzzy layering.
The scaling factor can take positive values. Factors smaller than 1 only consider large overlaps of the nodes' bounds in the main layout direction. Factors larger than 1 also combine nodes with some distance between them.
Property Value
Throws
- Exception ({ name: 'ArgumentError' })
- if the specified value is less than
0
Default Value
Sample Graphs
See Also
Methods
Assigns all nodes of the graph to layers by analyzing already existing node coordinates and adds them to the layers instance in the given layoutContext.
layoutContext.Parameters
- graph: LayoutGraph
- the input graph
- layoutContext: HierarchicalLayoutContext
- the HierarchicalLayoutContext used for querying information about the nodes and edges
Implements
ILayerAssigner.assignLayersCallback used for calculating the lower (max) value of a given node.
Parameters
- graph: LayoutGraph
- The graph
- node: LayoutNode
- The node
Return Value
- number
- The lower (max) value of a given node
Callback used for calculating the upper (min) value of a given node.
Parameters
- graph: LayoutGraph
- The graph
- node: LayoutNode
- The node
Return Value
- number
- The upper (min) value of a given node