question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Cose layout not working properly

See original GitHub issue

I recently upgraded from 2.5.1 to 2.7.10 and I’m now running into two issues that previously weren’t there with the cose layout.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Reactions:4
  • Comments:7 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
maxkfranzcommented, Nov 9, 2016

Force-directed / physics simulation layouts generally need unique initial positions to work properly, or you get invalid forces (0 distance) and all the nodes don’t move. You need to either specify nodes with initial positions or tell the layout to set some for you with randomize: true: http://jsbin.com/pekotesuno/2/edit?js,output

Same for your second case: http://jsbin.com/gukeqiyuqe/1/edit?js,output

0reactions
maxkfranzcommented, Nov 16, 2016

See also https://github.com/cytoscape/cytoscape.js/issues/1520 which should automatically mitigate this issue for CoSE

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cytoscape.js - layout() doesn't work in Firefox, works in Chrome
I have a page showing a graph with Cytoscape.js, but .layout() does not work for me in Firefox, however it does in Chrome....
Read more >
Build a Responsive UI with ConstraintLayout
ConstraintLayout allows you to create large and complex layouts with a flat view hierarchy (no nested view groups). It's similar to RelativeLayout in...
Read more >
Using layouts - Cytoscape.js
A discrete layout is synchronous: The resultant positions are synchronously set such that you can access those resultant node positions on the ...
Read more >
CSS Grid Layout - CSS: Cascading Style Sheets | MDN
Like tables, grid layout enables an author to align elements into columns and rows. However, many more layouts are either possible or easier ......
Read more >
Drawing elements do not show within a layout viewport in ...
If it is close to or the same as the background display of the layout (thus not showing), change it. Note: For linework...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found