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
125 stars 33 forks source link

Weird behavior during edge collapse #103

Closed hasanbalci closed 4 years ago

hasanbalci commented 4 years ago

While testing, I faced with the following: Peek 2020-07-23 15-23

In this case, either only loops should be collapsed or none.

canbax commented 4 years ago

When I select edges with completely different source target pairs, it does not collapses. So to be more consistent I also didn't collapsed here.

hasanbalci commented 4 years ago

@canbax @ugurdogrusoz It's ok now, but I also realized that when we click on "Collapse all edges" in the demo, loops are not collapsed. Maybe we can collapse them as well. What do you think?

canbax commented 4 years ago

I think we should collapse the self-loops as well.

ugurdogrusoz commented 4 years ago

Sure let's collapse them as well.

hasanbalci commented 4 years ago

There is still a small inconsistency: Peek 2020-07-28 19-14

Moreover, I think demo file checks whether there are at least two selected nodes when clicked on "Collapse edges between selected nodes" and "Expand edges between selected nodes". I think we can remove this check so that when we only select the node with self loops and click on these buttons, we can collapse and expand self loops.

hasanbalci commented 4 years ago

@canbax It seems working, thanks!