cola
.nodes(G.graph.nodes)
.links(G.graph.links)
.groups(G.graph.groups) <--- line 72
.constraints(G.graph.constraints)
.start(10,10,10);
What appears to be happening is that even though group members are valid (it has been set previously) they are re-set to undefined if cola.groups is invoked on it a 2nd time.
The analogous re-application of .nodes and .links does not raise an error.
In the above example, the following is a workaround (group elements are reinitialized to the analogous node indexes).
// uncomment for work around to bug
//G.graph.groups[0].leaves = [0];
It appears that .groups can not be re-applied to an array.
This bug can be illustrated using this .html gist; it is an adaptation of a WebCola example.
The error that is raised is
For immediate context
What appears to be happening is that even though group members are valid (it has been set previously) they are re-set to undefined if cola.groups is invoked on it a 2nd time.
The analogous re-application of .nodes and .links does not raise an error.
In the above example, the following is a workaround (group elements are reinitialized to the analogous node indexes).