Skip to content

Commit

Permalink
Proper merge of clip-rect fix.
Browse files Browse the repository at this point in the history
  • Loading branch information
DmitryBaranovskiy committed Sep 5, 2011
1 parent 45a97e7 commit 475454d
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion raphael-min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion raphael.js
Expand Up @@ -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) {
Expand Down
7 changes: 3 additions & 4 deletions raphael.vml.js
Expand Up @@ -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;
}
}
Expand Down

0 comments on commit 475454d

Please sign in to comment.