How can i rescale all the element inside a Raphael
canvas on window change ?
considering the following code / DEMO if i re-size my window only div container
scaled since i set its width to 50% of the window width and none of the (rect
, circle
or path
) change
CODE
<div id="container"></div>
#container{border : 1px solid black ;
width : 50% ;
height:300px}
var con = $("#container");
var paper = Raphael(con.attr('id'), con.attr('width'), con.attr('height'));
var win = paper.rect(0,0,400,300).attr({stroke: 'black' }) ;
var path = paper.path("M 200 100 l 100 0 z") ;
var cir = paper.circle(50, 50, 40);