fix: Fix old IE bug.

parent 757b8285
......@@ -5366,7 +5366,7 @@
| })(Raphael.ninja());
\*/
R.ninja = function () {
oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael;
//oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael;
return R;
};
/*\
......
......@@ -477,6 +477,9 @@
if (o._.sx != 1 || o._.sy != 1) {
value /= mmax(abs(o._.sx), abs(o._.sy)) || 1;
}
if (o.paper._vbSize) {
value *= o.paper._vbSize;
}
node.setAttribute(att, value);
if (attrs["stroke-dasharray"]) {
addDashes(o, attrs["stroke-dasharray"], params);
......
......@@ -899,9 +899,9 @@
};
R._engine.setViewBox = function (x, y, w, h, fit) {
R.eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]);
var paperSize = this.getSize(),
width = paperSize.width,
height = paperSize.height,
var width = this.width,
height = this.height,
size = 1 / mmax(w / width, h / height),
H, W;
if (fit) {
H = height / h;
......@@ -917,10 +917,10 @@
this._viewBoxShift = {
dx: -x,
dy: -y,
scale: paperSize
scale: size
};
this.forEach(function (el) {
el.transform("...");
el.transform("");
});
return this;
};
......
{
"name": "raphael",
"version": "2.1.4",
"version": "2.1.4a",
"description": "JavaScript Vector Library",
"main": "raphael.amd.js",
"scripts": {
......@@ -32,6 +32,6 @@
"url": "https://github.com/DmitryBaranovskiy/raphael/issues"
},
"homepage": "https://github.com/DmitryBaranovskiy/raphael",
"_id": "raphael@2.1.4",
"_id": "raphael@2.1.4a",
"_from": "raphael@"
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
// ┌────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\
// │ Raphaël 2.1.4a - JavaScript Vector Library │ \\
// ├────────────────────────────────────────────────────────────────────┤ \\
// │ Core Module │ \\
// ├────────────────────────────────────────────────────────────────────┤ \\
......@@ -84,7 +84,7 @@
}
}
}
R.version = "2.1.4";
R.version = "2.1.4a";
R.eve = eve;
var loaded,
separator = /[, ]+/,
......@@ -5366,7 +5366,7 @@
| })(Raphael.ninja());
\*/
R.ninja = function () {
oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael;
//oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael;
return R;
};
/*\
......@@ -5414,7 +5414,7 @@
}));
// ┌─────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\
// │ Raphaël 2.1.4a - JavaScript Vector Library │ \\
// ├─────────────────────────────────────────────────────────────────────┤ \\
// │ SVG Module │ \\
// ├─────────────────────────────────────────────────────────────────────┤ \\
......@@ -5892,6 +5892,9 @@
if (o._.sx != 1 || o._.sy != 1) {
value /= mmax(abs(o._.sx), abs(o._.sy)) || 1;
}
if (o.paper._vbSize) {
value *= o.paper._vbSize;
}
node.setAttribute(att, value);
if (attrs["stroke-dasharray"]) {
addDashes(o, attrs["stroke-dasharray"], params);
......@@ -6836,7 +6839,7 @@
}));
// ┌─────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\
// │ Raphaël 2.1.4a - JavaScript Vector Library │ \\
// ├─────────────────────────────────────────────────────────────────────┤ \\
// │ VML Module │ \\
// ├─────────────────────────────────────────────────────────────────────┤ \\
......@@ -7736,9 +7739,9 @@
};
R._engine.setViewBox = function (x, y, w, h, fit) {
R.eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]);
var paperSize = this.getSize(),
width = paperSize.width,
height = paperSize.height,
var width = this.width,
height = this.height,
size = 1 / mmax(w / width, h / height),
H, W;
if (fit) {
H = height / h;
......@@ -7754,10 +7757,10 @@
this._viewBoxShift = {
dx: -x,
dy: -y,
scale: paperSize
scale: size
};
this.forEach(function (el) {
el.transform("...");
el.transform("");
});
return this;
};
......
......@@ -381,7 +381,7 @@
}));
// ┌────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\
// │ Raphaël 2.1.4a - JavaScript Vector Library │ \\
// ├────────────────────────────────────────────────────────────────────┤ \\
// │ Core Module │ \\
// ├────────────────────────────────────────────────────────────────────┤ \\
......@@ -466,7 +466,7 @@
}
}
}
R.version = "2.1.4";
R.version = "2.1.4a";
R.eve = eve;
var loaded,
separator = /[, ]+/,
......@@ -5748,7 +5748,7 @@
| })(Raphael.ninja());
\*/
R.ninja = function () {
oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael;
//oldRaphael.was ? (g.win.Raphael = oldRaphael.is) : delete Raphael;
return R;
};
/*\
......@@ -5796,7 +5796,7 @@
}));
// ┌─────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\
// │ Raphaël 2.1.4a - JavaScript Vector Library │ \\
// ├─────────────────────────────────────────────────────────────────────┤ \\
// │ SVG Module │ \\
// ├─────────────────────────────────────────────────────────────────────┤ \\
......@@ -6274,6 +6274,9 @@
if (o._.sx != 1 || o._.sy != 1) {
value /= mmax(abs(o._.sx), abs(o._.sy)) || 1;
}
if (o.paper._vbSize) {
value *= o.paper._vbSize;
}
node.setAttribute(att, value);
if (attrs["stroke-dasharray"]) {
addDashes(o, attrs["stroke-dasharray"], params);
......@@ -7218,7 +7221,7 @@
}));
// ┌─────────────────────────────────────────────────────────────────────┐ \\
// │ Raphaël 2.1.4 - JavaScript Vector Library │ \\
// │ Raphaël 2.1.4a - JavaScript Vector Library │ \\
// ├─────────────────────────────────────────────────────────────────────┤ \\
// │ VML Module │ \\
// ├─────────────────────────────────────────────────────────────────────┤ \\
......@@ -8118,9 +8121,9 @@
};
R._engine.setViewBox = function (x, y, w, h, fit) {
R.eve("raphael.setViewBox", this, this._viewBox, [x, y, w, h, fit]);
var paperSize = this.getSize(),
width = paperSize.width,
height = paperSize.height,
var width = this.width,
height = this.height,
size = 1 / mmax(w / width, h / height),
H, W;
if (fit) {
H = height / h;
......@@ -8136,10 +8139,10 @@
this._viewBoxShift = {
dx: -x,
dy: -y,
scale: paperSize
scale: size
};
this.forEach(function (el) {
el.transform("...");
el.transform("");
});
return this;
};
......
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