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

fix: expanding collapsed edges breaks existing edges #131

Open sashokbg opened 3 years ago

sashokbg commented 3 years ago

This PR fixes issues described in #128 where expanding / collapsing edges can lead to an exception and a loss of edges between nodes.

Second issue was that collapsing / expanding nodes with collapsed edges would result into a bad "repair" of the original link's source and destination

Revadike commented 2 years ago

Your PR does not seem to fix this issue, but the master banch on your fork does. What's up with that?

Revadike commented 2 years ago

Your fork was working perfectly, until I came across this issue when I try to collapse a compound node with a lot of nodes:

image

This node actually exists in the input data I don't know why it throws this error The original cytoscape.js-expand-collapse library does not have this issue This is really frustrating!

sashokbg commented 2 years ago

Hello, @Revadike it is because there are a couple of fixes and the repository maintainers do not wish to merge them. On my fork I have merged both to the master branch.

Regarding your other issue I can't tell where it may be coming from. You should create a minimal example that reproduces it.

P.S Yes it is frustrating when things do not work but please have in mind that this is a open source collaboration and everyone of us contributes in terms of their availability and motivation. Please try contributing as well ! :)

Revadike commented 2 years ago

I can't figure out what the issue is, but when I expand a node with collapsed edges (to other collapsed nodes), it gives this error: image

Even though, the non-existent source (in this case scan-1110-12877) is stored in the appropriate collapsed edge originalEnds property.

If I leave all edges expanded and only use collapsing/expanding nodes, it works without issues.