How do I resize the canvas of th JIT Graph after it's been once drawn? JIT Force Directed Graph is described here
I've tried smt like the following (using jQuery):
function resizeCanvas(size) {
var e$ = $('#visualizerView, #visualizerContainer');
e$.animate(
{height: "+=" + size + "px"},
500
);
//TODO make it work?
//$('#visualizerView').empty();
//var pos = fdGraph.canvas.getPos(true);
//alert(pos.x+" "+pos.y)
//fdGraph.canvas.translate(0, -50);
//fdGraph.canvas
//initGraph(graph);
}
But I the best thing I can do is to stretch the container DIV - not the canvas itself. When I stretch the canvas the aspect ratio gets wrong...