DmitryBaranovskiy/raphael — Issue #432: ie7 & ie8 : setViewBox is undefined
Author: ma2thieu
Created: 2011-10-28 17:25:17+00:00
State: open

calling setSize() on a paper with a viewBox gives this error in ie7 and ie8 :

'setViewBox' is undefined
raphael.js, line 5317 caharcter 13

To reproduce the bug :

// Creates canvas 320 × 200 at 10, 50
var paper = Raphael(10, 50, 320, 200);

paper.setViewBox(0, 0, 500, 500, true);

// Creates circle at x = 50, y = 40, with radius 10
var circle = paper.circle(50, 40, 10);
// Sets the fill attribute of the circle to red (#f00)
circle.attr("fill", "#f00");

// Sets the stroke attribute of the circle to white
circle.attr("stroke", "#fff");

paper.setSize(200, 200);