As the InfoVis/TheJit API Documentation, there's the .eachNode()
function that allows you to loop through all nodes and retrieve their data.
$jit.Graph.Util.eachNode( graph, function( node ) {
console.log( node );
} );
// or:
graph.eachNode( function( node ) {
console.log( node );
} );
As I haven't worked with InfoVis/TheJit for over a year and currently have no project set up, I don't know if you can retrieve the position with Graph.Node.getPos()
. Anyway, if you figured this step out, you'd have to write an object/array/matrix that will hold the position. In case some el is to close to another el, you'd use Graph.Node.setPos()
to relocate it.