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