Commit 45a97e76 by Dmitry Baranovskiy

Merge pull request #390 from chuchuva/2.0

clip-rect attribute bugfix
parents 0c4db232 b69b846b
...@@ -4607,8 +4607,7 @@ window.Raphael.vml && function (R) { ...@@ -4607,8 +4607,7 @@ window.Raphael.vml && function (R) {
rect[2] = +rect[2] + (+rect[0]); rect[2] = +rect[2] + (+rect[0]);
rect[3] = +rect[3] + (+rect[1]); rect[3] = +rect[3] + (+rect[1]);
var div = node.clipRect || R._g.doc.createElement("div"), var div = node.clipRect || R._g.doc.createElement("div"),
dstyle = div.style, dstyle = div.style;
group = node.parentNode;
dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect); dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect);
if (!node.clipRect) { if (!node.clipRect) {
dstyle.position = "absolute"; dstyle.position = "absolute";
...@@ -4616,8 +4615,8 @@ window.Raphael.vml && function (R) { ...@@ -4616,8 +4615,8 @@ window.Raphael.vml && function (R) {
dstyle.left = 0; dstyle.left = 0;
dstyle.width = o.paper.width + "px"; dstyle.width = o.paper.width + "px";
dstyle.height = o.paper.height + "px"; dstyle.height = o.paper.height + "px";
group.parentNode.insertBefore(div, group); node.parentNode.insertBefore(div, node);
div.appendChild(group); div.appendChild(node);
node.clipRect = div; node.clipRect = div;
} }
} }
......
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