Closed hrvoj3e closed 4 years ago
@hrvoj3e The reason behind the error is that you give dangling edges to the layout which doesn't deal with that case. (node.outgoers()
only returns outgoing edges and target nodes, not the source node.)
What I can suggest you is to use cytoscape-layout-utilities extension that does exactly what you want. It positions the newly added nodes with respect to their already laid out neighbors. Then, optionally you can apply fCoSE on the whole graph or only on the desired part (without dangling edges) incrementally (with randomize: false
) for polishing.
@hrvoj3e In other words, a layout algorithm will not properly work if you want to layout edges whose both ends aren't provided (as nodes to be laid out).
I get when running
layout(...).run()
on a subset of newly added nodes.Line
115
https://github.com/iVis-at-Bilkent/cytoscape.js-fcose/blob/8e02e9b493d16f7446052e2188a29198d85e0234/src/fcose/cose.js#L109-L120My code