jit
jit copied to clipboard
How do I avoid the nodes to extend outside of the visible canvas
Sometimes when loading the ForceDirected graph, some nodes gets displayed outside of the canvas area and are therefore hidden. Is there some property to set to avoid this behaviour?
// load JSON data. fd.loadJSON(json); // compute positions incrementally and animate. fd.computeIncremental({ iter: 40, property: 'end', onStep: function (perc) { Log.write(perc + '% loaded...'); }, onComplete: function () { Log.write('done'); fd.animate({ modes: ['linear'], transition: $jit.Trans.Elastic.easeOut, duration: 2500 }); } });