Closed akevalion closed 3 years ago
For https://github.com/cytoscape/cytoscape.js-euler
Euler is similar to RSForceBaseLayout
I used the example https://cytoscape.org/cytoscape.js-euler/
And I have created this visualization: http://ws.stfx.eu/2VFW7KZGQKXS
Euler uses a lot of methods related to animations. But for roassal3 we already have a package to manage this kind of animations.
For https://github.com/cytoscape/cytoscape.js-cola. This is a connector for a more complex layout https://github.com/tgdwyer/WebCola.
Users of WebCola can use tree.js, cytoscape.js, svg.js or d3js to run 2D or 3D visualizations. This javascript project has:
Typically a Constraint looks like:
{
"type": "alignment",
"axis": "x",
"offsets": [
{"node": "1","offset": "0"},
{"node": "2", "offset": "0"},
{"node": "3", "offset": "0"}
]
}
Cola API for this example https://github.com/tgdwyer/WebCola/blob/master/WebCola/examples/unix.html
d3cola
.avoidOverlaps(true)
.convergenceThreshold(1e-3)
.flowLayout('x', 150)
.size([width, height])
.nodes(nodes)
.links(edges)
.jaccardLinkLengths(150);
Produces
I like from this WebCola example that lines don't overlap over boxes (nodes) as GraphViz. Maybe we can try to implement the A* algorithm to have it in RS3. Sorry if this comment is off-topic.
I am not sure how A* algorithm helps doing a layout. It seems to be an algorithm to search for path no?
You are right, I'm not sure if it fits the requirement. I had that idea because maybe after the force layout algorithm finds places for the nodes, then a pass of this algorithm on each edge could the polygon or bezier to avoid overlapping the nodes.
Interesting idea!
I think we can close this issue
Review these links and select the useful code for RSForcebaseLayout
https://github.com/cytoscape/cytoscape.js-euler
https://github.com/cytoscape/cytoscape.js-cola