Permalink
Browse files

Proper merge of clip-rect fix.

  • Loading branch information...
1 parent 45a97e7 commit 475454d2689dd6bc79c4ce896bf9b50cc4240f5a @DmitryBaranovskiy DmitryBaranovskiy committed Sep 5, 2011
Showing with 5 additions and 6 deletions.
  1. +1 −1 raphael-min.js
  2. +1 −1 raphael.js
  3. +3 −4 raphael.vml.js
View

Large diffs are not rendered by default.

Oops, something went wrong.
View
@@ -4368,7 +4368,7 @@ window.Raphael.svg && function (R) {
R.prototype.renderfix = function () {
var cnvs = this.canvas,
s = cnvs.style,
- pos = cnvs.getScreenCTM(),
+ pos = cnvs.getScreenCTM() || cnvs.createSVGMatrix(),
left = -pos.e % 1,
top = -pos.f % 1;
if (left || top) {
View
@@ -190,17 +190,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 475454d

Please sign in to comment.