iVis-at-Bilkent / cytoscape.js-expand-collapse

A Cytoscape.js extension to expand/collapse nodes for better management of complexity of compound graphs
MIT License
126 stars 37 forks source link

Node and edge collapse do not work together #100

Open ugurdogrusoz opened 4 years ago

ugurdogrusoz commented 4 years ago

When we do this in reverse order, collapse the compound first and then collapse inter-graph meta edges, we might have similar problems.

canbax commented 4 years ago

I also observed this. Probably the reason is when a compound node is collapsed, its children are removed from cy.

When we expand a meta edge, source or target of an edge might be inside a compound node. In this case, since source or target of an edge won't be found, cytoscape.js gives an error.

c8ERNCijiY

below are my error logs.

core.js:6228 ERROR Error: Can not create edge e1630253 with nonexistant source n1 at error (cytoscape.cjs.js:828) at Collection.push../node_modules/cytoscape/dist/cytoscape.cjs.js.elesfn$u.restore (cytoscape.cjs.js:12962) at Core.add (cytoscape.cjs.js:13356) at Object.expandEdge (expandCollapseUtilities.js:782) at index.js:248 at Element.forEach (cytoscape.cjs.js:11196) at Object.api.expandEdges (index.js:247)

gabrywu commented 2 years ago

any updates?

canbax commented 2 years ago

any updates?

It is about user behavior. You should not let the user expand such an edge.