|
|
|
@ -68,14 +68,12 @@
|
|
|
|
|
errors = []; |
|
|
|
|
current_event = name; |
|
|
|
|
stop = 0; |
|
|
|
|
for (var i = 0, ii = listeners.length; i < ii; i++) { |
|
|
|
|
if ("zIndex" in listeners[i]) { |
|
|
|
|
for (var i = 0, ii = listeners.length; i < ii; i++) if ("zIndex" in listeners[i]) { |
|
|
|
|
indexed.push(listeners[i].zIndex); |
|
|
|
|
if (listeners[i].zIndex < 0) { |
|
|
|
|
queue[listeners[i].zIndex] = listeners[i]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
indexed.sort(numsort); |
|
|
|
|
while (indexed[z] < 0) { |
|
|
|
|
l = queue[indexed[z++]]; |
|
|
|
@ -100,7 +98,7 @@
|
|
|
|
|
if (stop) { |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} while (l); |
|
|
|
|
} while (l) |
|
|
|
|
} else { |
|
|
|
|
queue[l.zIndex] = l; |
|
|
|
|
} |
|
|
|
@ -187,7 +185,7 @@
|
|
|
|
|
\*/ |
|
|
|
|
eve.on = function (name, f) { |
|
|
|
|
name = String(name); |
|
|
|
|
if (typeof f !== "function") { |
|
|
|
|
if (typeof f != "function") { |
|
|
|
|
return function () {}; |
|
|
|
|
} |
|
|
|
|
var names = name.split(separator), |
|
|
|
@ -197,11 +195,9 @@
|
|
|
|
|
e = e.hasOwnProperty(names[i]) && e[names[i]] || (e[names[i]] = {n: {}}); |
|
|
|
|
} |
|
|
|
|
e.f = e.f || []; |
|
|
|
|
for (i = 0, ii = e.f.length; i < ii; i++) { |
|
|
|
|
if (e.f[i] == f) { |
|
|
|
|
for (i = 0, ii = e.f.length; i < ii; i++) if (e.f[i] == f) { |
|
|
|
|
return fun; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
e.f.push(f); |
|
|
|
|
return function (zIndex) { |
|
|
|
|
if (+zIndex == +zIndex) { |
|
|
|
@ -310,12 +306,10 @@
|
|
|
|
|
splice.push(e[names[i]]); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
for (key in e) { |
|
|
|
|
if (e[has](key)) { |
|
|
|
|
for (key in e) if (e[has](key)) { |
|
|
|
|
splice.push(e[key]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
cur.splice.apply(cur, splice); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -324,34 +318,26 @@
|
|
|
|
|
while (e.n) { |
|
|
|
|
if (f) { |
|
|
|
|
if (e.f) { |
|
|
|
|
for (j = 0, jj = e.f.length; j < jj; j++) { |
|
|
|
|
if (e.f[j] == f) { |
|
|
|
|
for (j = 0, jj = e.f.length; j < jj; j++) if (e.f[j] == f) { |
|
|
|
|
e.f.splice(j, 1); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
!e.f.length && delete e.f; |
|
|
|
|
} |
|
|
|
|
for (key in e.n) { |
|
|
|
|
if (e.n[has](key) && e.n[key].f) { |
|
|
|
|
for (key in e.n) if (e.n[has](key) && e.n[key].f) { |
|
|
|
|
var funcs = e.n[key].f; |
|
|
|
|
for (j = 0, jj = funcs.length; j < jj; j++) { |
|
|
|
|
if (funcs[j] == f) { |
|
|
|
|
for (j = 0, jj = funcs.length; j < jj; j++) if (funcs[j] == f) { |
|
|
|
|
funcs.splice(j, 1); |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
!funcs.length && delete e.n[key].f; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
delete e.f; |
|
|
|
|
for (key in e.n) { |
|
|
|
|
if (e.n[has](key) && e.n[key].f) { |
|
|
|
|
for (key in e.n) if (e.n[has](key) && e.n[key].f) { |
|
|
|
|
delete e.n[key].f; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
e = e.n; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
@ -468,17 +454,17 @@
|
|
|
|
|
return loaded ? first() : eve.on("raphael.DOMload", first); |
|
|
|
|
} else if (R.is(first, array)) { |
|
|
|
|
return R._engine.create[apply](R, first.splice(0, 3 + R.is(first[0], nu))).add(first); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
var args = Array.prototype.slice.call(arguments, 0); |
|
|
|
|
if (R.is(args[args.length - 1], "function")) { |
|
|
|
|
var f = args.pop(); |
|
|
|
|
return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on("raphael.DOMload", function () { |
|
|
|
|
f.call(R._engine.create[apply](R, args)); |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
return R._engine.create[apply](R, arguments); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
R.version = "2.1.4"; |
|
|
|
|
R.eve = eve; |
|
|
|
@ -535,7 +521,7 @@
|
|
|
|
|
appendChild = "appendChild", |
|
|
|
|
apply = "apply", |
|
|
|
|
concat = "concat", |
|
|
|
|
supportsTouch = ("ontouchstart" in g.win) || g.win.DocumentTouch && g.doc instanceof DocumentTouch, // taken from Modernizr touch test
|
|
|
|
|
supportsTouch = ('ontouchstart' in g.win) || g.win.DocumentTouch && g.doc instanceof DocumentTouch, //taken from Modernizr touch test
|
|
|
|
|
E = "", |
|
|
|
|
S = " ", |
|
|
|
|
Str = String, |
|
|
|
@ -563,7 +549,7 @@
|
|
|
|
|
push = "push", |
|
|
|
|
ISURL = R._ISURL = /^url\(['"]?(.+?)['"]?\)$/i, |
|
|
|
|
colourRegExp = /^\s*((#[a-f\d]{6})|(#[a-f\d]{3})|rgba?\(\s*([\d\.]+%?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+%?(?:\s*,\s*[\d\.]+%?)?)\s*\)|hsba?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\)|hsla?\(\s*([\d\.]+(?:deg|\xb0|%)?\s*,\s*[\d\.]+%?\s*,\s*[\d\.]+(?:%?\s*,\s*[\d\.]+)?)%?\s*\))\s*$/i, |
|
|
|
|
isnan = {NaN: 1, Infinity: 1, "-Infinity": 1}, |
|
|
|
|
isnan = {"NaN": 1, "Infinity": 1, "-Infinity": 1}, |
|
|
|
|
bezierrg = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/, |
|
|
|
|
round = math.round, |
|
|
|
|
setAttribute = "setAttribute", |
|
|
|
@ -580,8 +566,8 @@
|
|
|
|
|
cy: 0, |
|
|
|
|
fill: "#fff", |
|
|
|
|
"fill-opacity": 1, |
|
|
|
|
font: "10px \"Arial\"", |
|
|
|
|
"font-family": "\"Arial\"", |
|
|
|
|
font: '10px "Arial"', |
|
|
|
|
"font-family": '"Arial"', |
|
|
|
|
"font-size": "10", |
|
|
|
|
"font-style": "normal", |
|
|
|
|
"font-weight": 400, |
|
|
|
@ -731,10 +717,10 @@
|
|
|
|
|
if (R.type == "VML") { |
|
|
|
|
var d = g.doc.createElement("div"), |
|
|
|
|
b; |
|
|
|
|
d.innerHTML = "<v:shape adj=\"1\"/>"; |
|
|
|
|
d.innerHTML = '<v:shape adj="1"/>'; |
|
|
|
|
b = d.firstChild; |
|
|
|
|
b.style.behavior = "url(#default#VML)"; |
|
|
|
|
if (!(b && typeof b.adj === "object")) { |
|
|
|
|
if (!(b && typeof b.adj == "object")) { |
|
|
|
|
return (R.type = E); |
|
|
|
|
} |
|
|
|
|
d = null; |
|
|
|
@ -801,22 +787,20 @@
|
|
|
|
|
return o instanceof Array; |
|
|
|
|
} |
|
|
|
|
return (type == "null" && o === null) || |
|
|
|
|
(type === typeof o && o !== null) || |
|
|
|
|
(type == typeof o && o !== null) || |
|
|
|
|
(type == "object" && o === Object(o)) || |
|
|
|
|
(type == "array" && Array.isArray && Array.isArray(o)) || |
|
|
|
|
objectToString.call(o).slice(8, -1).toLowerCase() == type; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
function clone(obj) { |
|
|
|
|
if (typeof obj === "function" || Object(obj) !== obj) { |
|
|
|
|
if (typeof obj == "function" || Object(obj) !== obj) { |
|
|
|
|
return obj; |
|
|
|
|
} |
|
|
|
|
var res = new obj.constructor; |
|
|
|
|
for (var key in obj) { |
|
|
|
|
if (obj[has](key)) { |
|
|
|
|
for (var key in obj) if (obj[has](key)) { |
|
|
|
|
res[key] = clone(obj[key]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return res; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -842,9 +826,9 @@
|
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
return (180 + math.atan2(-y, -x) * 180 / PI + 360) % 360; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
/*\ |
|
|
|
|
* Raphael.rad |
|
|
|
@ -885,11 +869,9 @@
|
|
|
|
|
tolerance = R.is(tolerance, "finite") ? tolerance : 10; |
|
|
|
|
if (R.is(values, array)) { |
|
|
|
|
var i = values.length; |
|
|
|
|
while (i--) { |
|
|
|
|
if (abs(values[i] - value) <= tolerance) { |
|
|
|
|
while (i--) if (abs(values[i] - value) <= tolerance) { |
|
|
|
|
return values[i]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
values = +values; |
|
|
|
|
var rem = value % values; |
|
|
|
@ -1221,12 +1203,10 @@
|
|
|
|
|
return this.join(",").replace(p2s, "$1"); |
|
|
|
|
}; |
|
|
|
|
function repush(array, item) { |
|
|
|
|
for (var i = 0, ii = array.length; i < ii; i++) { |
|
|
|
|
if (array[i] === item) { |
|
|
|
|
for (var i = 0, ii = array.length; i < ii; i++) if (array[i] === item) { |
|
|
|
|
return array.push(array.splice(i, 1)[0]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
function cacher(f, scope, postprocessor) { |
|
|
|
|
function newf() { |
|
|
|
|
var arg = Array.prototype.slice.call(arguments, 0), |
|
|
|
@ -1512,14 +1492,12 @@
|
|
|
|
|
} |
|
|
|
|
if (name == "r") { |
|
|
|
|
data.push([b][concat](params)); |
|
|
|
|
} else { |
|
|
|
|
while (params.length >= paramCounts[name]) { |
|
|
|
|
} else while (params.length >= paramCounts[name]) { |
|
|
|
|
data.push([b][concat](params.splice(0, paramCounts[name]))); |
|
|
|
|
if (!paramCounts[name]) { |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
|
data.toString = R._path2string; |
|
|
|
@ -1570,12 +1548,10 @@
|
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
setTimeout(function () { |
|
|
|
|
for (var key in p) { |
|
|
|
|
if (p[has](key) && key != ps) { |
|
|
|
|
for (var key in p) if (p[has](key) && key != ps) { |
|
|
|
|
p[key].sleep--; |
|
|
|
|
!p[key].sleep && delete p[key]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return p[ps]; |
|
|
|
|
}; |
|
|
|
@ -2319,14 +2295,14 @@
|
|
|
|
|
m2[1] = 2 * m1[1] - m2[1]; |
|
|
|
|
if (recursive) { |
|
|
|
|
return [m2, m3, m4][concat](res); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
res = [m2, m3, m4][concat](res).join()[split](","); |
|
|
|
|
var newres = []; |
|
|
|
|
for (var i = 0, ii = res.length; i < ii; i++) { |
|
|
|
|
newres[i] = i % 2 ? rotate(res[i - 1], res[i], rad).y : rotate(res[i], res[i + 1], rad).x; |
|
|
|
|
} |
|
|
|
|
return newres; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
findDotAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) { |
|
|
|
|
var t1 = 1 - t; |
|
|
|
@ -2405,7 +2381,8 @@
|
|
|
|
|
if (pcom == "C" || pcom == "S") { // In "S" case we have to take into account, if the previous command is C/S.
|
|
|
|
|
nx = d.x * 2 - d.bx; // And reflect the previous
|
|
|
|
|
ny = d.y * 2 - d.by; // command's control point relative to the current point.
|
|
|
|
|
} else { // or some else or nothing
|
|
|
|
|
} |
|
|
|
|
else { // or some else or nothing
|
|
|
|
|
nx = d.x; |
|
|
|
|
ny = d.y; |
|
|
|
|
} |
|
|
|
@ -2415,7 +2392,8 @@
|
|
|
|
|
if (pcom == "Q" || pcom == "T") { // In "T" case we have to take into account, if the previous command is Q/T.
|
|
|
|
|
d.qx = d.x * 2 - d.qx; // And make a reflection similar
|
|
|
|
|
d.qy = d.y * 2 - d.qy; // to case "S".
|
|
|
|
|
} else { // or something else or nothing
|
|
|
|
|
} |
|
|
|
|
else { // or something else or nothing
|
|
|
|
|
d.qx = d.x; |
|
|
|
|
d.qy = d.y; |
|
|
|
|
} |
|
|
|
@ -2486,7 +2464,8 @@
|
|
|
|
|
|
|
|
|
|
if (p2) { // the same procedures is done to p2
|
|
|
|
|
p2[i] && (pfirst = p2[i][0]); |
|
|
|
|
if (pfirst != "C") { |
|
|
|
|
if (pfirst != "C") |
|
|
|
|
{ |
|
|
|
|
pcoms2[i] = pfirst; |
|
|
|
|
i && (pcom = pcoms2[i-1]); |
|
|
|
|
} |
|
|
|
@ -2740,16 +2719,16 @@
|
|
|
|
|
case "m": return [l, 1, 0, 0, 1, 0, 0]; |
|
|
|
|
case "r": if (item.length == 4) { |
|
|
|
|
return [l, 0, item[2], item[3]]; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
return [l, 0]; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
case "s": if (item.length == 5) { |
|
|
|
|
return [l, 1, 1, item[3], item[4]]; |
|
|
|
|
} else if (item.length == 3) { |
|
|
|
|
return [l, 1, 1]; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
return [l, 1]; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
equaliseTransform = R._equaliseTransform = function (t1, t2) { |
|
|
|
@ -2795,13 +2774,13 @@
|
|
|
|
|
width: container.style.pixelWidth || container.offsetWidth, |
|
|
|
|
height: container.style.pixelHeight || container.offsetHeight |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
return { |
|
|
|
|
container: container, |
|
|
|
|
width: y, |
|
|
|
|
height: w |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return { |
|
|
|
|
container: 1, |
|
|
|
@ -3099,9 +3078,9 @@
|
|
|
|
|
return (s.dx || s.dy ? "t" + [s.dx, s.dy] : E) + |
|
|
|
|
(s.scalex != 1 || s.scaley != 1 ? "s" + [s.scalex, s.scaley, 0, 0] : E) + |
|
|
|
|
(s.rotate ? "r" + [s.rotate, 0, 0] : E); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
return "m" + [this.get(0), this.get(1), this.get(2), this.get(3), this.get(4), this.get(5)]; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
})(Matrix.prototype); |
|
|
|
|
|
|
|
|
@ -3158,7 +3137,8 @@
|
|
|
|
|
return function () { |
|
|
|
|
obj.removeEventListener(type, f, false); |
|
|
|
|
|
|
|
|
|
if (supportsTouch && touchMap[type]) {obj.removeEventListener(touchMap[type], _f, false);} |
|
|
|
|
if (supportsTouch && touchMap[type]) |
|
|
|
|
obj.removeEventListener(touchMap[type], _f, false); |
|
|
|
|
|
|
|
|
|
return true; |
|
|
|
|
}; |
|
|
|
@ -3515,11 +3495,9 @@
|
|
|
|
|
} |
|
|
|
|
if (arguments.length == 1) { |
|
|
|
|
if (R.is(key, "object")) { |
|
|
|
|
for (var i in key) { |
|
|
|
|
if (key[has](i)) { |
|
|
|
|
for (var i in key) if (key[has](i)) { |
|
|
|
|
this.data(i, key[i]); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
eve("raphael.data.get." + this.id, this, data[key], key); |
|
|
|
@ -3674,13 +3652,11 @@
|
|
|
|
|
\*/ |
|
|
|
|
elproto.undrag = function () { |
|
|
|
|
var i = draggable.length; |
|
|
|
|
while (i--) { |
|
|
|
|
if (draggable[i].el == this) { |
|
|
|
|
while (i--) if (draggable[i].el == this) { |
|
|
|
|
this.unmousedown(draggable[i].start); |
|
|
|
|
draggable.splice(i, 1); |
|
|
|
|
eve.unbind("raphael.drag.*." + this.id); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
!draggable.length && R.unmousemove(dragMove).unmouseup(dragUp); |
|
|
|
|
drag = []; |
|
|
|
|
}; |
|
|
|
@ -4121,8 +4097,8 @@
|
|
|
|
|
\*/ |
|
|
|
|
elproto.isPointInside = function (x, y) { |
|
|
|
|
var rp = this.realPath = getPath[this.type](this); |
|
|
|
|
if (this.attr("transform") && this.attr("transform").length) { |
|
|
|
|
rp = R.transformPath(rp, this.attr("transform")); |
|
|
|
|
if (this.attr('transform') && this.attr('transform').length) { |
|
|
|
|
rp = R.transformPath(rp, this.attr('transform')); |
|
|
|
|
} |
|
|
|
|
return R.isPointInsidePath(rp, x, y); |
|
|
|
|
}; |
|
|
|
@ -4240,9 +4216,9 @@
|
|
|
|
|
getPointAtSegmentLength = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length) { |
|
|
|
|
if (length == null) { |
|
|
|
|
return bezlen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
return R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, getTatLen(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, length)); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
getLengthFactory = function (istotal, subpath) { |
|
|
|
|
return function (path, length, onlystart) { |
|
|
|
@ -4551,8 +4527,7 @@
|
|
|
|
|
} |
|
|
|
|
if (time < ms) { |
|
|
|
|
var pos = easing(time / ms); |
|
|
|
|
for (var attr in from) { |
|
|
|
|
if (from[has](attr)) { |
|
|
|
|
for (var attr in from) if (from[has](attr)) { |
|
|
|
|
switch (availableAnimAttrs[attr]) { |
|
|
|
|
case nu: |
|
|
|
|
now = +from[attr] + pos * ms * diff[attr]; |
|
|
|
@ -4612,7 +4587,6 @@
|
|
|
|
|
} |
|
|
|
|
set[attr] = now; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
that.attr(set); |
|
|
|
|
(function (id, that, anim) { |
|
|
|
|
setTimeout(function () { |
|
|
|
@ -4630,11 +4604,9 @@
|
|
|
|
|
that.attr(to); |
|
|
|
|
animationElements.splice(l--, 1); |
|
|
|
|
if (e.repeat > 1 && !e.next) { |
|
|
|
|
for (key in to) { |
|
|
|
|
if (to[has](key)) { |
|
|
|
|
for (key in to) if (to[has](key)) { |
|
|
|
|
init[key] = e.totalOrigin[key]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
e.el.attr(init); |
|
|
|
|
runAnimation(e.anim, e.el, e.anim.percents[0], null, e.totalOrigin, e.repeat - 1); |
|
|
|
|
} |
|
|
|
@ -4753,12 +4725,10 @@
|
|
|
|
|
this.ms = ms; |
|
|
|
|
this.times = 1; |
|
|
|
|
if (anim) { |
|
|
|
|
for (var attr in anim) { |
|
|
|
|
if (anim[has](attr)) { |
|
|
|
|
for (var attr in anim) if (anim[has](attr)) { |
|
|
|
|
newAnim[toFloat(attr)] = anim[attr]; |
|
|
|
|
percents.push(toFloat(attr)); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
percents.sort(sortByNumber); |
|
|
|
|
} |
|
|
|
|
this.anim = newAnim; |
|
|
|
@ -4850,8 +4820,7 @@
|
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
if (!isInAnim) { |
|
|
|
|
for (var attr in params) { |
|
|
|
|
if (params[has](attr)) { |
|
|
|
|
for (var attr in params) if (params[has](attr)) { |
|
|
|
|
if (availableAnimAttrs[has](attr) || element.paper.customAttributes[has](attr)) { |
|
|
|
|
from[attr] = element.attr(attr); |
|
|
|
|
(from[attr] == null) && (from[attr] = availableAttrs[attr]); |
|
|
|
@ -4958,7 +4927,6 @@
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
var easing = params.easing, |
|
|
|
|
easyeasy = R.easing_formulas[easing]; |
|
|
|
|
if (!easyeasy) { |
|
|
|
@ -5041,12 +5009,10 @@
|
|
|
|
|
var p = {}, |
|
|
|
|
json, |
|
|
|
|
attr; |
|
|
|
|
for (attr in params) { |
|
|
|
|
if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + "%" != attr) { |
|
|
|
|
for (attr in params) if (params[has](attr) && toFloat(attr) != attr && toFloat(attr) + "%" != attr) { |
|
|
|
|
json = true; |
|
|
|
|
p[attr] = params[attr]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (!json) { |
|
|
|
|
// if percent-like syntax is used and end-of-all animation callback used
|
|
|
|
|
if(callback){ |
|
|
|
@ -5058,16 +5024,16 @@
|
|
|
|
|
lastKey = percent; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
lastKey += "%"; |
|
|
|
|
lastKey += '%'; |
|
|
|
|
// if already defined callback in the last keyframe, skip
|
|
|
|
|
!params[lastKey].callback && (params[lastKey].callback = callback); |
|
|
|
|
} |
|
|
|
|
return new Animation(params, ms); |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
easing && (p.easing = easing); |
|
|
|
|
callback && (p.callback = callback); |
|
|
|
|
return new Animation({100: p}, ms); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
/*\ |
|
|
|
|
* Element.animate |
|
|
|
@ -5147,7 +5113,7 @@
|
|
|
|
|
if (value != null) { |
|
|
|
|
runAnimation(anim, this, -1, mmin(value, 1)); |
|
|
|
|
return this; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
len = animationElements.length; |
|
|
|
|
for (; i < len; i++) { |
|
|
|
|
e = animationElements[i]; |
|
|
|
@ -5165,7 +5131,7 @@
|
|
|
|
|
return 0; |
|
|
|
|
} |
|
|
|
|
return out; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
/*\ |
|
|
|
|
* Element.pause |
|
|
|
@ -5180,13 +5146,11 @@
|
|
|
|
|
= (object) original element |
|
|
|
|
\*/ |
|
|
|
|
elproto.pause = function (anim) { |
|
|
|
|
for (var i = 0; i < animationElements.length; i++) { |
|
|
|
|
if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { |
|
|
|
|
for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { |
|
|
|
|
if (eve("raphael.anim.pause." + this.id, this, animationElements[i].anim) !== false) { |
|
|
|
|
animationElements[i].paused = true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return this; |
|
|
|
|
}; |
|
|
|
|
/*\ |
|
|
|
@ -5202,15 +5166,13 @@
|
|
|
|
|
= (object) original element |
|
|
|
|
\*/ |
|
|
|
|
elproto.resume = function (anim) { |
|
|
|
|
for (var i = 0; i < animationElements.length; i++) { |
|
|
|
|
if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { |
|
|
|
|
for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { |
|
|
|
|
var e = animationElements[i]; |
|
|
|
|
if (eve("raphael.anim.resume." + this.id, this, e.anim) !== false) { |
|
|
|
|
delete e.paused; |
|
|
|
|
this.status(e.anim, e.status); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return this; |
|
|
|
|
}; |
|
|
|
|
/*\ |
|
|
|
@ -5226,22 +5188,18 @@
|
|
|
|
|
= (object) original element |
|
|
|
|
\*/ |
|
|
|
|
elproto.stop = function (anim) { |
|
|
|
|
for (var i = 0; i < animationElements.length; i++) { |
|
|
|
|
if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { |
|
|
|
|
for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.id == this.id && (!anim || animationElements[i].anim == anim)) { |
|
|
|
|
if (eve("raphael.anim.stop." + this.id, this, animationElements[i].anim) !== false) { |
|
|
|
|
animationElements.splice(i--, 1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return this; |
|
|
|
|
}; |
|
|
|
|
function stopAnimation(paper) { |
|
|
|
|
for (var i = 0; i < animationElements.length; i++) { |
|
|
|
|
if (animationElements[i].el.paper == paper) { |
|
|
|
|
for (var i = 0; i < animationElements.length; i++) if (animationElements[i].el.paper == paper) { |
|
|
|
|
animationElements.splice(i--, 1); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
eve.on("raphael.remove", stopAnimation); |
|
|
|
|
eve.on("raphael.clear", stopAnimation); |
|
|
|
|
elproto.toString = function () { |
|
|
|
@ -5316,8 +5274,7 @@
|
|
|
|
|
} |
|
|
|
|
return this; |
|
|
|
|
}; |
|
|
|
|
for (var method in elproto) { |
|
|
|
|
if (elproto[has](method)) { |
|
|
|
|
for (var method in elproto) if (elproto[has](method)) { |
|
|
|
|
setproto[method] = (function (methodname) { |
|
|
|
|
return function () { |
|
|
|
|
var arg = arguments; |
|
|
|
@ -5327,7 +5284,6 @@
|
|
|
|
|
}; |
|
|
|
|
})(method); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
setproto.attr = function (name, value) { |
|
|
|
|
if (name && R.is(name, array) && R.is(name[0], "object")) { |
|
|
|
|
for (var j = 0, jj = name.length; j < jj; j++) { |
|
|
|
@ -5402,12 +5358,10 @@
|
|
|
|
|
= (boolean) `true` if object was found & removed from the set |
|
|
|
|
\*/ |
|
|
|
|
setproto.exclude = function (el) { |
|
|
|
|
for (var i = 0, ii = this.length; i < ii; i++) { |
|
|
|
|
if (this[i] == el) { |
|
|
|
|
for (var i = 0, ii = this.length; i < ii; i++) if (this[i] == el) { |
|
|
|
|
this.splice(i, 1); |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
setproto.animate = function (params, ms, easing, callback) { |
|
|
|
|
(R.is(easing, "function") || !easing) && (callback = easing || null); |
|
|
|
@ -5443,15 +5397,13 @@
|
|
|
|
|
y = [], |
|
|
|
|
x2 = [], |
|
|
|
|
y2 = []; |
|
|
|
|
for (var i = this.items.length; i--;) { |
|
|
|
|
if (!this.items[i].removed) { |
|
|
|
|
for (var i = this.items.length; i--;) if (!this.items[i].removed) { |
|
|
|
|
var box = this.items[i].getBBox(); |
|
|
|
|
x.push(box.x); |
|
|
|
|
y.push(box.y); |
|
|
|
|
x2.push(box.x + box.width); |
|
|
|
|
y2.push(box.y + box.height); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
x = mmin[apply](0, x); |
|
|
|
|
y = mmin[apply](0, y); |
|
|
|
|
x2 = mmax[apply](0, x2); |
|
|
|
@ -5539,11 +5491,9 @@
|
|
|
|
|
glyphs: {} |
|
|
|
|
}, |
|
|
|
|
family = font.face["font-family"]; |
|
|
|
|
for (var prop in font.face) { |
|
|
|
|
if (font.face[has](prop)) { |
|
|
|
|
for (var prop in font.face) if (font.face[has](prop)) { |
|
|
|
|
fontcopy.face[prop] = font.face[prop]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (this.fonts[family]) { |
|
|
|
|
this.fonts[family].push(fontcopy); |
|
|
|
|
} else { |
|
|
|
@ -5551,8 +5501,7 @@
|
|
|
|
|
} |
|
|
|
|
if (!font.svg) { |
|
|
|
|
fontcopy.face["units-per-em"] = toInt(font.face["units-per-em"], 10); |
|
|
|
|
for (var glyph in font.glyphs) { |
|
|
|
|
if (font.glyphs[has](glyph)) { |
|
|
|
|
for (var glyph in font.glyphs) if (font.glyphs[has](glyph)) { |
|
|
|
|
var path = font.glyphs[glyph]; |
|
|
|
|
fontcopy.glyphs[glyph] = { |
|
|
|
|
w: path.w, |
|
|
|
@ -5562,15 +5511,12 @@
|
|
|
|
|
}) + "z" |
|
|
|
|
}; |
|
|
|
|
if (path.k) { |
|
|
|
|
for (var k in path.k) { |
|
|
|
|
if (path[has](k)) { |
|
|
|
|
for (var k in path.k) if (path[has](k)) { |
|
|
|
|
fontcopy.glyphs[glyph].k[k] = path.k[k]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return font; |
|
|
|
|
}; |
|
|
|
|
/*\ |
|
|
|
@ -5599,15 +5545,13 @@
|
|
|
|
|
var font = R.fonts[family]; |
|
|
|
|
if (!font) { |
|
|
|
|
var name = new RegExp("(^|\\s)" + family.replace(/[^\w\d\s+!~.:_-]/g, E) + "(\\s|$)", "i"); |
|
|
|
|
for (var fontName in R.fonts) { |
|
|
|
|
if (R.fonts[has](fontName)) { |
|
|
|
|
for (var fontName in R.fonts) if (R.fonts[has](fontName)) { |
|
|
|
|
if (name.test(fontName)) { |
|
|
|
|
font = R.fonts[fontName]; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
var thefont; |
|
|
|
|
if (font) { |
|
|
|
|
for (var i = 0, ii = font.length; i < ii; i++) { |
|
|
|
@ -5782,7 +5726,7 @@
|
|
|
|
|
if (name in res) { |
|
|
|
|
res = res[name]; |
|
|
|
|
} |
|
|
|
|
typeof res === "function" && isFunc && (res = res()); |
|
|
|
|
typeof res == "function" && isFunc && (res = res()); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
res = (res == null || res == obj ? all : res) + ""; |
|
|
|
@ -5907,18 +5851,16 @@
|
|
|
|
|
}; |
|
|
|
|
var $ = function (el, attr) { |
|
|
|
|
if (attr) { |
|
|
|
|
if (typeof el === "string") { |
|
|
|
|
if (typeof el == "string") { |
|
|
|
|
el = $(el); |
|
|
|
|
} |
|
|
|
|
for (var key in attr) { |
|
|
|
|
if (attr[has](key)) { |
|
|
|
|
for (var key in attr) if (attr[has](key)) { |
|
|
|
|
if (key.substring(0, 6) == "xlink:") { |
|
|
|
|
el.setAttributeNS(xlink, key.substring(6), Str(attr[key])); |
|
|
|
|
} else { |
|
|
|
|
el.setAttribute(key, Str(attr[key])); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
el = R._g.doc.createElementNS("http://www.w3.org/2000/svg", el); |
|
|
|
|
el.style && (el.style.webkitTapHighlightColor = "rgba(0,0,0,0)"); |
|
|
|
@ -6148,13 +6090,11 @@
|
|
|
|
|
delete o._.arrows[se + "Type"]; |
|
|
|
|
delete o._.arrows[se + "String"]; |
|
|
|
|
} |
|
|
|
|
for (attr in markerCounter) { |
|
|
|
|
if (markerCounter[has](attr) && !markerCounter[attr]) { |
|
|
|
|
for (attr in markerCounter) if (markerCounter[has](attr) && !markerCounter[attr]) { |
|
|
|
|
var item = R._g.doc.getElementById(attr); |
|
|
|
|
item && item.parentNode.removeChild(item); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
dasharray = { |
|
|
|
|
"-": [3, 1], |
|
|
|
@ -6179,7 +6119,8 @@
|
|
|
|
|
dashes[i] = value[i] * width + ((i % 2) ? 1 : -1) * butt; |
|
|
|
|
} |
|
|
|
|
$(o.node, {"stroke-dasharray": dashes.join(",")}); |
|
|
|
|
} else { |
|
|
|
|
} |
|
|
|
|
else { |
|
|
|
|
$(o.node, {"stroke-dasharray": "none"}); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
@ -6465,14 +6406,12 @@
|
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
tspans = node.getElementsByTagName("tspan"); |
|
|
|
|
for (i = 0, ii = tspans.length; i < ii; i++) { |
|
|
|
|
if (i) { |
|
|
|
|
for (i = 0, ii = tspans.length; i < ii; i++) if (i) { |
|
|
|
|
$(tspans[i], {dy: fontSize * leading, x: a.x}); |
|
|
|
|
} else { |
|
|
|
|
$(tspans[0], {dy: 0}); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
$(node, {x: a.x, y: a.y}); |
|
|
|
|
el._.dirty = 1; |
|
|
|
|
var bb = el._getBBox(), |
|
|
|
@ -6482,9 +6421,9 @@
|
|
|
|
|
getRealNode = function (node) { |
|
|
|
|
if (node.parentNode && node.parentNode.tagName.toLowerCase() === "a") { |
|
|
|
|
return node.parentNode; |
|
|
|
|
} |
|
|
|
|
} else { |
|
|
|
|
return node; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
Element = function (node, svg) { |
|
|
|
|
var X = 0, |
|
|
|
@ -6781,7 +6720,7 @@
|
|
|
|
|
this.removeData(); |
|
|
|
|
|
|
|
|
|
for (var i in this) { |
|
|
|
|
this[i] = typeof this[i] === "function" ? R._removedFactory(i) : null; |
|
|
|
|
this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; |
|
|
|
|
} |
|
|
|
|
this.removed = true; |
|
|
|
|
}; |
|
|
|
@ -6813,7 +6752,7 @@
|
|
|
|
|
y: this.node.clientTop, |
|
|
|
|
width: this.node.clientWidth, |
|
|
|
|
height: this.node.clientHeight |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
} finally { |
|
|
|
|
bbox = bbox || {}; |
|
|
|
|
if(canvasHidden){ |
|
|
|
@ -6910,11 +6849,9 @@
|
|
|
|
|
} |
|
|
|
|
if (name == null) { |
|
|
|
|
var res = {}; |
|
|
|
|
for (var a in this.attrs) { |
|
|
|
|
if (this.attrs[has](a)) { |
|
|
|
|
for (var a in this.attrs) if (this.attrs[has](a)) { |
|
|
|
|
res[a] = this.attrs[a]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; |
|
|
|
|
res.transform = this._.transform; |
|
|
|
|
return res; |
|
|
|
@ -6956,17 +6893,13 @@
|
|
|
|
|
for (var key in params) { |
|
|
|
|
eve("raphael.attr." + key + "." + this.id, this, params[key]); |
|
|
|
|
} |
|
|
|
|
for (key in this.paper.customAttributes) { |
|
|
|
|
if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { |
|
|
|
|
for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { |
|
|
|
|
var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); |
|
|
|
|
this.attrs[key] = params[key]; |
|
|
|
|
for (var subkey in par) { |
|
|
|
|
if (par[has](subkey)) { |
|
|
|
|
for (var subkey in par) if (par[has](subkey)) { |
|
|
|
|
params[subkey] = par[subkey]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
setFillAndStroke(this, params); |
|
|
|
|
return this; |
|
|
|
|
}; |
|
|
|
@ -7270,12 +7203,11 @@
|
|
|
|
|
eve("raphael.remove", this); |
|
|
|
|
this.canvas.parentNode && this.canvas.parentNode.removeChild(this.canvas); |
|
|
|
|
for (var i in this) { |
|
|
|
|
this[i] = typeof this[i] === "function" ? R._removedFactory(i) : null; |
|
|
|
|
this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
|
var setproto = R.st; |
|
|
|
|
for (var method in elproto) { |
|
|
|
|
if (elproto[has](method) && !setproto[has](method)) { |
|
|
|
|
for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) { |
|
|
|
|
setproto[method] = (function (methodname) { |
|
|
|
|
return function () { |
|
|
|
|
var arg = arguments; |
|
|
|
@ -7285,7 +7217,6 @@
|
|
|
|
|
}; |
|
|
|
|
})(method); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
})); |
|
|
|
|
|
|
|
|
|
// ┌─────────────────────────────────────────────────────────────────────┐ \\
|
|
|
|
@ -7461,11 +7392,9 @@
|
|
|
|
|
res = o; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (var par in params) { |
|
|
|
|
if (params[has](par)) { |
|
|
|
|
for (var par in params) if (params[has](par)) { |
|
|
|
|
a[par] = params[par]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
if (newpath) { |
|
|
|
|
a.path = R._getPath[o.type](o); |
|
|
|
|
o._.dirty = 1; |
|
|
|
@ -7519,7 +7448,7 @@
|
|
|
|
|
if (o.textpath) { |
|
|
|
|
var textpathStyle = o.textpath.style; |
|
|
|
|
params.font && (textpathStyle.font = params.font); |
|
|
|
|
params["font-family"] && (textpathStyle.fontFamily = "\"" + params["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, E) + "\""); |
|
|
|
|
params["font-family"] && (textpathStyle.fontFamily = '"' + params["font-family"].split(",")[0].replace(/^['"]+|['"]+$/g, E) + '"'); |
|
|
|
|
params["font-size"] && (textpathStyle.fontSize = params["font-size"]); |
|
|
|
|
params["font-weight"] && (textpathStyle.fontWeight = params["font-weight"]); |
|
|
|
|
params["font-style"] && (textpathStyle.fontStyle = params["font-style"]); |
|
|
|
@ -7652,12 +7581,10 @@
|
|
|
|
|
|
|
|
|
|
("x" in params || "y" in params) && (res.path.v = R.format("m{0},{1}l{2},{1}", round(a.x * zoom), round(a.y * zoom), round(a.x * zoom) + 1)); |
|
|
|
|
var dirtyattrs = ["x", "y", "text", "font", "font-family", "font-weight", "font-style", "font-size"]; |
|
|
|
|
for (var d = 0, dd = dirtyattrs.length; d < dd; d++) { |
|
|
|
|
if (dirtyattrs[d] in params) { |
|
|
|
|
for (var d = 0, dd = dirtyattrs.length; d < dd; d++) if (dirtyattrs[d] in params) { |
|
|
|
|
res._.dirty = 1; |
|
|
|
|
break; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// text-anchor emulation
|
|
|
|
|
switch (a["text-anchor"]) { |
|
|
|
@ -7888,7 +7815,8 @@
|
|
|
|
|
elproto.auxGetBBox = R.el.getBBox; |
|
|
|
|
elproto.getBBox = function(){ |
|
|
|
|
var b = this.auxGetBBox(); |
|
|
|
|
if (this.paper && this.paper._viewBoxShift) { |
|
|
|
|
if (this.paper && this.paper._viewBoxShift) |
|
|
|
|
{ |
|
|
|
|
var c = {}; |
|
|
|
|
var z = 1/this.paper._viewBoxShift.scale; |
|
|
|
|
c.x = b.x - this.paper._viewBoxShift.dx; |
|
|
|
@ -7924,7 +7852,7 @@
|
|
|
|
|
this.node.parentNode.removeChild(this.node); |
|
|
|
|
this.shape && this.shape.parentNode.removeChild(this.shape); |
|
|
|
|
for (var i in this) { |
|
|
|
|
this[i] = typeof this[i] === "function" ? R._removedFactory(i) : null; |
|
|
|
|
this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; |
|
|
|
|
} |
|
|
|
|
this.removed = true; |
|
|
|
|
}; |
|
|
|
@ -7934,11 +7862,9 @@
|
|
|
|
|
} |
|
|
|
|
if (name == null) { |
|
|
|
|
var res = {}; |
|
|
|
|
for (var a in this.attrs) { |
|
|
|
|
if (this.attrs[has](a)) { |
|
|
|
|
for (var a in this.attrs) if (this.attrs[has](a)) { |
|
|
|
|
res[a] = this.attrs[a]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
res.gradient && res.fill == "none" && (res.fill = res.gradient) && delete res.gradient; |
|
|
|
|
res.transform = this._.transform; |
|
|
|
|
return res; |
|
|
|
@ -7978,17 +7904,13 @@
|
|
|
|
|
eve("raphael.attr." + key + "." + this.id, this, params[key]); |
|
|
|
|
} |
|
|
|
|
if (params) { |
|
|
|
|
for (key in this.paper.customAttributes) { |
|
|
|
|
if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { |
|
|
|
|
for (key in this.paper.customAttributes) if (this.paper.customAttributes[has](key) && params[has](key) && R.is(this.paper.customAttributes[key], "function")) { |
|
|
|
|
var par = this.paper.customAttributes[key].apply(this, [].concat(params[key])); |
|
|
|
|
this.attrs[key] = params[key]; |
|
|
|
|
for (var subkey in par) { |
|
|
|
|
if (par[has](subkey)) { |
|
|
|
|
for (var subkey in par) if (par[has](subkey)) { |
|
|
|
|
params[subkey] = par[subkey]; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
// this.paper.canvas.style.display = "none";
|
|
|
|
|
if (params.text && this.type == "text") { |
|
|
|
|
this.textpath.string = params.text; |
|
|
|
@ -8236,11 +8158,11 @@
|
|
|
|
|
try { |
|
|
|
|
!doc.namespaces.rvml && doc.namespaces.add("rvml", "urn:schemas-microsoft-com:vml"); |
|
|
|
|
createNode = function (tagName) { |
|
|
|
|
return doc.createElement("<rvml:" + tagName + " class=\"rvml\">"); |
|
|
|
|
return doc.createElement('<rvml:' + tagName + ' class="rvml">'); |
|
|
|
|
}; |
|
|
|
|
} catch (e) { |
|
|
|
|
createNode = function (tagName) { |
|
|
|
|
return doc.createElement("<" + tagName + " xmlns=\"urn:schemas-microsoft.com:vml\" class=\"rvml\">"); |
|
|
|
|
return doc.createElement('<' + tagName + ' xmlns="urn:schemas-microsoft.com:vml" class="rvml">'); |
|
|
|
|
}; |
|
|
|
|
} |
|
|
|
|
}; |
|
|
|
@ -8300,14 +8222,13 @@
|
|
|
|
|
R.eve("raphael.remove", this); |
|
|
|
|
this.canvas.parentNode.removeChild(this.canvas); |
|
|
|
|
for (var i in this) { |
|
|
|
|
this[i] = typeof this[i] === "function" ? R._removedFactory(i) : null; |
|
|
|
|
this[i] = typeof this[i] == "function" ? R._removedFactory(i) : null; |
|
|
|
|
} |
|
|
|
|
return true; |
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
var setproto = R.st; |
|
|
|
|
for (var method in elproto) { |
|
|
|
|
if (elproto[has](method) && !setproto[has](method)) { |
|
|
|
|
for (var method in elproto) if (elproto[has](method) && !setproto[has](method)) { |
|
|
|
|
setproto[method] = (function (methodname) { |
|
|
|
|
return function () { |
|
|
|
|
var arg = arguments; |
|
|
|
@ -8317,7 +8238,6 @@
|
|
|
|
|
}; |
|
|
|
|
})(method); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
})); |
|
|
|
|
|
|
|
|
|
// ┌────────────────────────────────────────────────────────────────────┐ \\
|
|
|
|
|