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

Compound order affects fitting of the layout #2802

Closed
hasanbalci opened this issue Dec 26, 2020 · 1 comment
Closed

Compound order affects fitting of the layout #2802

hasanbalci opened this issue Dec 26, 2020 · 1 comment
Labels
bug A bug in the code of Cytoscape.js
Milestone

Comments

@hasanbalci
Copy link
Contributor

Environment info

  • Cytoscape.js version : It seems like it exists for a long time.
  • Browser/Node.js & version : Google Chrome 87.0.4280.88 (32-bit version)

Current (buggy) behaviour

Assume that we have two nested compound nodes. If we give the parent one before the child in the node list while creating the graph, then layouts don't fit to the canvas when animate option is set to true or end (animation from the initial positions to the end positions). As far as I know, there is no condition on the order of giving nodes in Cytoscape.js.

I prepared a jsbin demo here to reproduce the bug using the random layout, but it also exists in other layouts such as cose, cose-bilkent and fcose etc. If you change the order of c1 and c2 nodes in the node array or set animate to false, then it starts to fit.

@hasanbalci hasanbalci added the bug A bug in the code of Cytoscape.js label Dec 26, 2020
@stale
Copy link

stale bot commented Jan 9, 2021

This issue has been automatically marked as stale, because it has not had activity within the past 14 days. It will be closed if no further activity occurs within the next 7 days. If a feature request is important to you, please consider making a pull request. Thank you for your contributions.

@stale stale bot added the stale label Jan 9, 2021
@stale stale bot closed this as completed Jan 16, 2021
@maxkfranz maxkfranz reopened this Jan 20, 2021
@stale stale bot removed the stale label Jan 20, 2021
maxkfranz added a commit that referenced this issue Jan 20, 2021
… includes compounds includes compounds for the fitting bounding box.

Ref. : Compound order affects fitting of the layout #2802

Closes #2802
@maxkfranz maxkfranz added this to the 3.17.2 milestone Jan 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug A bug in the code of Cytoscape.js
Projects
None yet
Development

No branches or pull requests

2 participants