cytoscape / cytoscape.js-dagre

The Dagre layout for DAGs and trees for Cytoscape.js
MIT License
250 stars 83 forks source link

Controlling nodes positions #41

Closed pmario26 closed 5 years ago

pmario26 commented 5 years ago

I'm currently working on a project that has been using the Cytoscape Dagre implementation for a long time. The lib is fantastic and always met the project needs until now but there is one new feature that i'm currently unable to implement. I would like to know if in the current version of the lib is there any way i can control the position of nodes to keep them aligned. For example: image I would like to keep some of the nodes in the graph above aligned like in the picture below: image I think this would improve greatly the understanding of some graphs, even if it increased the number of crossing edges as a side effect. Is there anyway i can achieve that with the current version of the lib ? If not, how could i contribute changing the lib to achieve that ?

maxkfranz commented 5 years ago

The dagre lib itself would have to be changed. This is just a wrapper.

See https://github.com/dagrejs/dagre