Skip to content
alon edited this page Oct 5, 2014 · 4 revisions

Welcome to the rhizi wiki!

Force Layout Notes

Two layouts

Should have two force layouts, to handle editing case

  • edited noted
  • rest of the nodes minus
  • requires bringing in nodes when a link is created. single connected component? break up at some arbitrary (node count based?) depth

Default location

Change default new node location, which is random in ([0, w], [0, h]) to something sensible (use cursor position, always have a spot and move others around it, or use overlay with alpha for rest. When node because child of existing one it will get a better location via force interactions).

Link Strength

currently unused (i.e. equal). Should be based on size of underlying tree (this requires a direction - so maybe just based on ''closeness to equal bipartate graphs''. Actually quite complex. Maybe flow is better: assume each leaf generates a flow of 1 (link strength of 1 / weight of edge 1 - same thing by definition), then calculate the rest of the nodes using some flow algorihtm (ford? I forget) and assign that.