Commit e3d40fc6 by Tomas Alabes

IE8 / R2.0.1 - viewbox scaling

parent 4ea67311
......@@ -573,6 +573,26 @@ window.Raphael && window.Raphael.vml && function(R) {
!this.removed && (this.node.style.display = E);
return this;
};
// Needed to fix the vml setViewBox issues
elproto.auxGetBBox = R.el.getBBox;
elproto.getBBox = function(){
var b = this.auxGetBBox();
if (this.paper && this.paper._viewBoxShift)
{
var c = {};
var z = 1/this.paper._viewBoxShift.scale;
c.x = b.x - this.paper._viewBoxShift.dx;
c.x *= z;
c.y = b.y - this.paper._viewBoxShift.dy;
c.y *= z;
c.width = b.width * z;
c.height = b.height * z;
c.x2 = c.x + c.width;
c.y2 = c.y + c.height;
return c;
}
return b;
};
elproto._getBBox = function () {
if (this.removed) {
return {};
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -7730,6 +7730,27 @@
!this.removed && (this.node.style.display = E);
return this;
};
// Needed to fix the vml setViewBox issues
elproto.auxGetBBox = R.el.getBBox;
elproto.getBBox = function(){
var b = this.auxGetBBox();
if (this.paper && this.paper._viewBoxShift)
{
var c = {};
var z = 1/this.paper._viewBoxShift.scale;
c.x = b.x - this.paper._viewBoxShift.dx;
c.x *= z;
c.y = b.y - this.paper._viewBoxShift.dy;
c.y *= z;
c.width = b.width * z;
c.height = b.height * z;
c.x2 = c.x + c.width;
c.y2 = c.y + c.height;
return c;
}
return b;
};
elproto._getBBox = function () {
if (this.removed) {
return {};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment