Specifies custom data for the FillAreaLayout.
Inheritance Hierarchy
Members
Show:
Constructors
Properties
Gets or sets the mapping from nodes to an object defining their component id.
Gets or sets the mapping from nodes to an object defining their component id.
Nodes of the same component should preferably not be separated. While the algorithm may move a whole component, it should try to not move only a subset of its elements. This means that the algorithm tries to move all elements of a component by the same offset (if at all). In order to achieve good results with this feature, the different components should not overlap in the initial drawing.
If custom components are specified, the componentAssignmentStrategy will be ignored.
If the input graph contains group nodes or a LayoutGrid structure, maintaining the specified components is not always possible. Furthermore, a custom component can never pass the border of a group node or layout grid cell, i.e., all nodes of a custom component have to be associated with the same group or grid cell.
conversionfinal
See Also
Gets or sets the collection of nodes that are fixed and must not be moved.
Gets or sets the collection of nodes that are fixed and must not be moved.
The algorithm tries to preserve the mental map and, thus, non-fixed nodes cannot simply pass/jump over the fixed nodes (i.e. fixed nodes restrict the possible movement of non-fixed nodes).
conversionfinal
See Also
Gets or sets the LayoutGrid layout data.
Gets or sets the LayoutGrid layout data.
final
Gets or sets the mapping from nodes to their margins.
Gets or sets the mapping from nodes to their margins.
Node margins allow to reserve space around nodes.
conversionfinal
Examples
The easiest option is to reserve the same space around all nodes, by setting a constant value:
layoutData.nodeMargins = new Insets(20)Handling only certain nodes differently can be done easily by using the mapper property:
// node1 only reserves space above and below
layoutData.nodeMargins.mapper.set(node1, new Insets(20, 10, 0, 0))
// node2 has space all around
layoutData.nodeMargins.mapper.set(node2, new Insets(25))
// all other nodes don't get extra spaceIn cases where the nodeMargins for each node can be determined by looking at the node itself it's often easier to just set a mapperFunction instead of preparing a mapper:
// Retrieve the space around the node from its tag property
layoutData.nodeMargins = (node: INode): Insets =>
new Insets(parseFloat(node.tag))See Also
Methods
combineWith
(data: LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel>): LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel>Combines this instance with the given layout data.
combineWith
(data: LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel>): LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel>Combines this instance with the given layout data.
This keeps the current instance unmodified and instead returns a new instance that dynamically combines the contents of all involved instances.
final
Parameters
- data: LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel>
- The LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel> to combine this instance with.
Return Value
- LayoutData<TNode, TEdge, TNodeLabel, TEdgeLabel>
- The combined layout data.
See Also
Developer's Guide
API
- CompositeLayoutData, GenericLayoutData