jdhenke / celestrium

A javascript library to visualize graphs.
MIT License
2 stars 1 forks source link

alternate layouts #9

Open jdhenke opened 11 years ago

jdhenke commented 11 years ago

options

plugins might now have to have a sense of which layout they are tied to.

maybe checkout d3's layouts for some more inspiration

jdhenke commented 10 years ago

RE: nested-force-directed layouts

it would be awesome to just give the same node object to multiple force directed layouts and let them do their thing.

unfortunately, force layouts would conflict in their assignments of the different attributes of the nodes as their is no notion of being a node with respect to a certain layout.

we'd probably have to wrap d3 or (sadly) modify d3 to support this.

we might be able to hack together a solution using callbacks to update different version of the same node between layouts.

additionally, this could be a cool exercise to see if it's possible, but at this point, there's no pressing need for this @jdhenke's UAP project, for displaying concepts && assertions, it could be interesting to cluster concepts, then cluster assertions around their concepts as a secondary force layout. bottom line, this could be useful.

maybe we can just add a g element with a transform(...) attribute to center around the appropriate node and run a normal force directed layout around that. links should still work, but we'd have to sortof undo the transforming effects in a logical way...