-
-
Notifications
You must be signed in to change notification settings - Fork 398
Open
Labels
questionFurther information is requestedFurther information is requested
Description
Hi there,
I am using the hierarchical layout with edges that can be 'split?', when splitting the edges I disable the layout so that none of the nodes move (it's really frustrating having the node you were looking at suddenly move), however when I re-enable the layout afterwards I get the following error:
Uncaught Error: To use the hierarchical layout, nodes require either no predefined levels or levels have to be defined for all nodes.
I have predefined levels manually on every node, and looping through the DataSet shows that each node does indeed have a level.
Here's how I do it:
this.options.layout.hierarchical.enabled = false;
this.network.setOptions(this.options);
// split the edges
// loop over the data set and log the node level - every node has a level
this.graphNodes.forEach(n => {
console.log(n.level);
})
this.options.layout.hierarchical.enabled = true;
this.network.setOptions(this.options);
Metadata
Metadata
Assignees
Labels
questionFurther information is requestedFurther information is requested