I am using Raphael to draw some shapes on the page. The <svg>
is already set to { width:100%; height:600px }
and that is working fine. As I resize the browser width, I would like to adjust the shapes inside the <svg>
to fit the new width. Ideally this should happen automatically; it just seems wrong to have to manually scale each shape and path on window.resize.
I know that percentages are illegal in the path string but this is essentially what I am looking to do:
var r = Raphael('container', '100%', 600);
r.path("M0,0 L0,0 55%,0 100%,61z")