Appearance
NodeGroupingOptions
Type: object
Properties
- duration(optional)
numberAnimation time in milliseconds. The animation will be played once after the creation of the group. Ignored ifenabledis false. - edgeGenerator(optional)
function(edges: EdgeList, groupId: string, transformation: Transformation): EdgeDataAndAttributesIfgroupEdgesistrue, indicates the function used to generate the new edges from the sub-edges. Ignored ifgroupEdgesisfalse. - enabled(optional)
booleanIndicates if the grouping must be enabled. - groupEdges(optional)
booleanIndicates if parallel edges that end up having at least one meta-node extremity should be grouped together (to reduce cluttering). - groupIdFunction(optional)
function(node: Node): string|undefinedGiven a node, must return a string identifying a group. All nodes for which the function returns the same value will be grouped together. By default group all the nodes that were selected together. Returningundefinedmeans that the node should not be grouped. - groupSelfLoopEdges(optional)
booleanIf true, edges for which the two extremities end up being grouped into the same node will be displayed as a self-loop edge, instead of not being displayed at all. - nodeGenerator(optional)
function(nodes: NodeList, groupId: string, transformation: Transformation): NodeDataAndAttributesGiven a list of nodes that should be grouped together, must return the new node (meta-node) to be added. Ifattributes.xandattributes.yare not specified, the meta-node will be put at the center of the nodes. - onCreated(optional)
function(metaNode: Node, showContents: boolean, subNodes: NodeList, subEdges: EdgeList): Promise<any>|undefinedThis is a callback called after a new group is created. See {@link ./tutorials/grouping/index.html | here} for more details. - padding(optional)
number|function(metaNode: Node): numberPadding applied to groups showing their content. If a function is passed, each MetaNode will get a padding depending on that function. - restorePositions(optional)
booleanWhen the grouping is disabled/destroyed, indicates if the nodes should be positioned back around the meta-node position - selector(optional)
function(node: Node): booleanOnly nodes that match this criteria will be grouped with other nodes. By default, all the nodes will be assigned a group. - separateEdgesByDirection(optional)
booleanBy default, edges that have opposite source and target are grouped together (resulting source and target not deterministic). If this option istrue, they will not be grouped together. - showContents(optional)
function(metaNode: Node): boolean | booleanFunction that would define if the contents of the group node should be hidden or not. This is called on every transformation update.