tgdwyer / WebCola

Javascript constraint-based graph layout
http://marvl.infotech.monash.edu/webcola/
MIT License
2.02k stars 258 forks source link

Is there a way to set sticky nodes? #107

Closed kristw closed 9 years ago

kristw commented 9 years ago

There are several nodes in the network that I want to fix their positions. From reading the documentation, I guess I have to set two constraints for each of the sticky nodes to fix their x and y. Is there an easier way to achieve the same results?

tgdwyer commented 9 years ago

No, the best way to fix the position of a node is by setting itsx,y yourself and then setting fixed=true.

I get this question a lot, so I wrote up a quick wiki page with some info: https://github.com/tgdwyer/WebCola/wiki/Fixed-Node-Positions

kristw commented 9 years ago

Thank you.