-
Notifications
You must be signed in to change notification settings - Fork 38
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Exception - Expanding Collapsed Edges of a Collapsed Child #128
Comments
I have debugged for a while and it seems both problems are coming from manipulating collapsed edges. First issue In the case of the first bug, it turns out when collapsing a node, and it has edges that have already been collapsed, we are not properly creating the _cy-expand-collapse-collapsed-edge_s. A quick fix for this issue is to just expand collapsed edges when collapsing a node. This way the meta edges are properly calculated. Second issue
|
A better fix is available at #131 |
Can anyone of the maintainers please take a look ? @metincansiper @hasanbalci |
Anyone ? |
I came here to report this exact issue. Can we get any insight from the maintainers to respond or accept #131? Or alternatively explain why they cannot/will not use this fix? |
+1 |
The first bug doesn't seem like a bug to me. It is a misuse of the API. You should not let the user expand a For the second, I can also say this is not a bug if you first expand the collapsed edge. But this time, expanding all the collapsed edges connected to the compounds before it is going to be expanded might be a good use case. |
"Collapse/expand edges" feature was added later. It seems that its interaction with the "collapse/expand nodes" feature wasn't considered comprehensively during addition of this new feature. Therefore, these side-effects/bugs are possible. However, expand-collapse is a rather complex extension and solving such bugs requires a detailed analysis and effort. We don't want to add bug-specific patches since they may cause other unexpected issues. Unfortunately, we currently don't have enough sources to solve this issue. My suggestion for you to avoid these cases is either to use @sashokbg's branch that possibly has a fix (I didn't try it) or to find some workarounds while presenting these features to your users. |
I am sorry to disagree but those are obviously bugs. Calling an API function that completely breaks the library, or wrongly reconstructs your edges afterwards is a definition of a bug. |
Hello, I have stumbled upon two bugs (possible more) when I try to expand edges that are pointing to a child of a collapsed node:
I have created a small demo file to reproduce the issue - you can check out at https://github.com/sashokbg/cytoscape.js-expand-collapse.git branch bug/child_collapse_edges file: demo/demo-bug.html
Bug 1 Disappearing edges - Steps to reproduce:
Starting graph
Click on "collapse edges" button
Close node 1
Close node a
Click on expand all edges <-- exception
Edges disappear
Stack:
Bug 2 - Expanded edges change source / destination
Starting graph
Click on "collapse all"
Click on "collapse edges"
Click on "expand all" <-- bug
Edges are not having as a source the parent node "a" instead of "1"
Click on "expand edges" <-- bug
Bug persist after expanding edges, now original links are wrongly having node "a" as a source
Observations
If we first collapse all nodes and then we expand them it seems that the exception issue is gone.
I have however still managed to reproduce the second bug in some scenarios when manually expanding and collapsing the child nodes and edges.
Any help or ideas are greatly appreciated !
Have a nice day!
Alex
The text was updated successfully, but these errors were encountered: