Skip to content
  1. API
  2. Types

NodeCollapsingOptions

Type: object

Properties

  • options
    • duration(optional) number[=0]
    • edgeGenerator(optional) function(hiddenNode: Node, node1: Node, node2: Node, edges1: EdgeList, edges2: EdgeList): RawEdge|null Function returning the RawEdge to create for each pair of adjacent nodes. hiddenNode is the node that is hidden (matches selector). node1 is the first neighbor of the pair. node2 is the second neighbor of the pair. edges1 is the list of edges between the hidden node and the first neighbor of the pair. edges2 is the list of edges between the hidden node and the second neighbor of the pair. The source and target of the edge may be specified; if it's the case they must be either node1 or node2. If it's not the case, an exception will be thrown. If source/target are not specified and the edges follow a consistent direction (e.g A <- B <- C), the source and target are assigned according to that direction (here A <- B). Otherwise (e.g A -> B <- C), node1 is used as the source and node2 is used as the target. If null is returned, no edge is created between the two nodes. If no edge generator is specified, a default edge is created.
    • enabled(optional) boolean[=true]
    • selector function(node: Node): boolean Function indicating which nodes will be hidden.