Commit 640a16e2 by Dmitry Baranovskiy

Fixed the bug with the image in IE.

parent 4993ea18
...@@ -275,7 +275,6 @@ var Raphael = (function (type) { ...@@ -275,7 +275,6 @@ var Raphael = (function (type) {
if (params.stroke == "none" || typeof stroke.on == "undefined") { if (params.stroke == "none" || typeof stroke.on == "undefined") {
stroke.on = false; stroke.on = false;
} }
// alert(stroke.on);
if (stroke.on && params.stroke) { if (stroke.on && params.stroke) {
stroke.color = params.stroke; stroke.color = params.stroke;
} }
...@@ -283,11 +282,11 @@ var Raphael = (function (type) { ...@@ -283,11 +282,11 @@ var Raphael = (function (type) {
stroke.joinstyle = params["stroke-linejoin"] || "miter"; stroke.joinstyle = params["stroke-linejoin"] || "miter";
stroke.miterlimit = params["stroke-miterlimit"] || 8; stroke.miterlimit = params["stroke-miterlimit"] || 8;
stroke.endcap = {butt: "flat", square: "square", round: "round"}[params["stroke-linecap"] || "miter"]; stroke.endcap = {butt: "flat", square: "square", round: "round"}[params["stroke-linecap"] || "miter"];
stroke.weight = (parseFloat(params["stroke-width"], 10) || 1) + "px"; stroke.weight = (parseFloat(params["stroke-width"], 10) || 1);
if (params["stroke-dasharray"]) { if (params["stroke-dasharray"]) {
var dashes = params["stroke-dasharray"].replace(" ", ",").split(","), var dashes = params["stroke-dasharray"].replace(" ", ",").split(","),
dashesn = [], dashesn = [],
str = parseFloat(stroke.weight, 10); str = stroke.weight;
for (var i = 0, ii = dashes.length; i < ii; i++) { for (var i = 0, ii = dashes.length; i < ii; i++) {
var res = dashes[i] / str; var res = dashes[i] / str;
if (!isNaN(res)) { if (!isNaN(res)) {
...@@ -385,7 +384,6 @@ var Raphael = (function (type) { ...@@ -385,7 +384,6 @@ var Raphael = (function (type) {
case "text": case "text":
this.textpath.v = ["m", Math.round(attr.x), ", ", Math.round(attr.y - 2), "l", Math.round(attr.x) + 1, ", ", Math.round(attr.y - 2)].join(""); this.textpath.v = ["m", Math.round(attr.x), ", ", Math.round(attr.y - 2), "l", Math.round(attr.x) + 1, ", ", Math.round(attr.y - 2)].join("");
return; return;
break;
default: default:
return; return;
} }
...@@ -579,12 +577,12 @@ var Raphael = (function (type) { ...@@ -579,12 +577,12 @@ var Raphael = (function (type) {
g.appendChild(o); g.appendChild(o);
vml.canvas.appendChild(g); vml.canvas.appendChild(g);
var res = new Element(o, g, vml); var res = new Element(o, g, vml);
res.type = "image";
res.setBox({x: x, y: y, w: w, h: h}); res.setBox({x: x, y: y, w: w, h: h});
o.attrs.x = x; o.attrs.x = x;
o.attrs.y = y; o.attrs.y = y;
o.attrs.w = w; o.attrs.w = w;
o.attrs.h = h; o.attrs.h = h;
res.type = "image";
return res; return res;
}; };
var theText = function (vml, x, y, text) { var theText = function (vml, x, y, text) {
......
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