views:

552

answers:

1

Hi there

I'm programming a debate-graph for my bachelor thesis with Raphael JS. point is, users can add nodes to the graph. eventually the graph gets really big and the canvas is still the same size. the canvas (in raphael js: paper) is inside another div with "overflow: scroll;", so lets ignore screen real estate

so is there a way that I resize the canvas without reloading the page (to assign new X/Y values)?

or what about creating a second bigger canvas in parallel and copying allllll the elements over? is there a way?

thanks

Tony

+1  A: 

If I understand your question, just call setSize() to expand the size of the canvas to the size needed as you need it. I've used this in a div with overflow:scroll to get the effect you describe.

Mark