Skip to content
Browse files

Merge pull request #390 from chuchuva/2.0

clip-rect attribute bugfix
  • Loading branch information...
2 parents 0c4db23 + b69b846 commit 45a97e76488cabae1495c1bbcd39989c45a88956 @DmitryBaranovskiy DmitryBaranovskiy committed Sep 4, 2011
Showing with 3 additions and 4 deletions.
  1. +3 −4 raphael.js
View
7 raphael.js
@@ -4607,17 +4607,16 @@ window.Raphael.vml && function (R) {
rect[2] = +rect[2] + (+rect[0]);
rect[3] = +rect[3] + (+rect[1]);
var div = node.clipRect || R._g.doc.createElement("div"),
- dstyle = div.style,
- group = node.parentNode;
+ dstyle = div.style;
dstyle.clip = R.format("rect({1}px {2}px {3}px {0}px)", rect);
if (!node.clipRect) {
dstyle.position = "absolute";
dstyle.top = 0;
dstyle.left = 0;
dstyle.width = o.paper.width + "px";
dstyle.height = o.paper.height + "px";
- group.parentNode.insertBefore(div, group);
- div.appendChild(group);
+ node.parentNode.insertBefore(div, node);
+ div.appendChild(node);
node.clipRect = div;
}
}

0 comments on commit 45a97e7

Please sign in to comment.
Something went wrong with that request. Please try again.