1 year ago

#312945

test-img

Nicolas Figay

Potential issue with move for Compound Graph [cytoscape.js]?

I've been experimenting Compound Graph editor based on Cytoscape.js.

I created a function for adding a compound node for a set of selected nodes with the same parent.

Roughly, it is first tested if the selected nodes have the same parent. If the case, a new node is create, as a child of the parent, and all the selected nodes are moved to this new node.

It seems to work well.

E.g. I created a set of nodes, and grouped them with two levels of decomposition the following way.

A hierarchy of compound nodes created with the created functions

However, when trying to apply the function on a set of nodes at layer 2 as illustrated in the next figure: Initiating grouping for a set of nodes layer 2

The result is quite surprising, as illustrated in the next figure. The hierarchy of compound nodes is fully changed, while applying exactly the same algorithm than previously. result of using the function

So I'm wondering if somebody already faced this, and if any idea concerning the reason of this behavior.

In order to debug, I tried to identify the place where the move function is defined in the code (but I didn't succeed yet) in order to put a breakpoint on the call to the move function and to identify which part of the code could cause the unexpected change of parents.

So if someone know where I can find this piece of code, it will also be helpful for understanding where the issue is coming from.

javascript

cytoscape.js

0 Answers

Your Answer

Accepted video resources