provides an interface for use with d3:
Correct way to create way to construct the d3 cola object is to pass the d3 object into the adaptor function, like so:
var d3cola = cola.d3adaptor(d3);
Internally, it will figure out if d3 is version 3 or 4 from the version tag and set up the right event forwarding. Defaults to version 3 if the d3 object is not passed.
uses the d3 event system to dispatch layout events such as:
o "start" (start layout process)
o "tick" (after each layout iteration)
o "end" (layout converged and complete).
uses the d3 timer to queue layout iterations.
sets up d3.behavior.drag to drag nodes
o use node.call(<the returned instance of Layout>.drag) to make nodes draggable
returns an instance of the cola.Layout itself with which the user
can interact directly.
provides an interface for use with d3: Correct way to create way to construct the d3 cola object is to pass the d3 object into the adaptor function, like so:
var d3cola = cola.d3adaptor(d3);
Internally, it will figure out if d3 is version 3 or 4 from the version tag and set up the right event forwarding. Defaults to version 3 if the d3 object is not passed.
node.call(<the returned instance of Layout>.drag)
to make nodes draggable returns an instance of the cola.Layout itself with which the user can interact directly.