Skip to content
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

Node and edge collapse do not work together #100

Open
ugurdogrusoz opened this issue Jun 10, 2020 · 3 comments
Open

Node and edge collapse do not work together #100

ugurdogrusoz opened this issue Jun 10, 2020 · 3 comments
Labels
bug Something isn't working

Comments

@ugurdogrusoz
Copy link
Contributor

ugurdogrusoz commented Jun 10, 2020

  • Construct a graph with 2 compounds and 2 inter-graph edges between the same source-target in these compound nodes
  • Collapse the inter-graph edges into a meta edge m1
  • Now collapse one of the compound nodes (this will create a new meta edge m2 which represents m1)
  • Expand the meta edge m2
    We get an exception.

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

@ugurdogrusoz ugurdogrusoz added the bug Something isn't working label Jun 10, 2020
@canbax
Copy link
Member

canbax commented Jun 11, 2020

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
Copy link

gabrywu commented Dec 31, 2021

any updates?

@canbax
Copy link
Member

canbax commented Dec 31, 2021

any updates?

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants