return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);
}
},
- mapPath = function (path, matrix) {
+ mapPath = R.mapPath = function (path, matrix) {
if (!matrix) {
return path;
}
return value;
};
- var createUUID = R._createUUID = (function (uuidRegEx, uuidReplacer) {
+
+ var createUUID = R.createUUID = (function (uuidRegEx, uuidReplacer) {
return function () {
return "xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(uuidRegEx, uuidReplacer).toUpperCase();
};
o.clip && o.clip.parentNode.parentNode.removeChild(o.clip.parentNode);
var el = $("clipPath"),
rc = $("rect");
- el.id = R._createUUID();
+ el.id = R.createUUID();
$(rc, {
x: rect[0],
y: rect[1],
if (isURL) {
el = $("pattern");
var ig = $("image");
- el.id = R._createUUID();
+ el.id = R.createUUID();
$(el, {x: 0, y: 0, patternUnits: "userSpaceOnUse", height: 1, width: 1});
$(ig, {x: 0, y: 0, "xlink:href": isURL[1]});
el.appendChild(ig);
var fltr = $("filter"),
blur = $("feGaussianBlur");
t.attrs.blur = size;
- fltr.id = R._createUUID();
+ fltr.id = R.createUUID();
$(blur, {stdDeviation: +size || 1.5});
fltr.appendChild(blur);
t.paper.defs.appendChild(fltr);
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.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;
}
}