Closed aryoxp closed 2 years ago
Hi @aryoxp,
You need to call the layout on all elements, not only on nodes. Instead of this.cy.nodes().layout({ ... }).run();
please use this.cy.elements().layout({ ... }).run();
or this.cy.layout({ ... }).run();
. Otherwise, layout cannot be aware of the edges.
Thank you, @hasanbalci. I understand now, and now it works perfectly.
Hi!,
Thank you for a nice layout library for the Cytoscape.JS. I made the following pen: (https://codepen.io/aryoxp/pen/MWEWrWj) to test how the fcose layout the graph. According to the documentation, if I put the following option in the layout,
I expect the library should layout the graph and tile unconnected nodes. However, when I run it, it tile all nodes, regardless connection. If the
tile
option is set tofalse
, the graph is properly layout, including all unconnected nodes.Is the library expected to behave like this? Because when I use an older version of the library (I don't remember which version), it behaves like I expect (layout the graph, group and tile all the remaining unconnected nodes).
PS: The same behaviour also happened on
cose-bilkent
layout.Thank you. Warm regards,
Aryo