Lines Matching +refs:R +refs:e

53     function R(first) {  class
54 if (R.is(first, "function")) {
56 } else if (R.is(first, array)) {
57 return R._engine.create[apply](R, first.splice(0, 3 + R.is(first[0], nu))).add(first);
60 if (R.is(args[args.length - 1], "function")) {
62 … return loaded ? f.call(R._engine.create[apply](R, args)) : eve.on("raphael.DOMload", function () {
63 f.call(R._engine.create[apply](R, args));
66 return R._engine.create[apply](R, arguments);
70 R.version = "2.2.0";
71 R.eve = eve;
152 ISURL = R._ISURL = /^url\(['"]?(.+?)['"]?\)$/i,
161 availableAttrs = R._availableAttrs = {
202 availableAnimAttrs = R._availableAnimAttrs = {
231 …radial_gradient = R._radial_gradient = /^r(?:\(([^,]+?)[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u…
243 rectPath = R._rectPath = function (x, y, w, h, r) {
255 getPath = R._getPath = {
294 mapPath = R.mapPath = function (path, matrix) {
312 R._g = g;
319R.type = (g.win.SVGAngle || g.doc.implementation.hasFeature("http://www.w3.org/TR/SVG11/feature#Ba…
320 if (R.type == "VML") {
327 return (R.type = E);
343 R.svg = !(R.vml = R.type == "VML");
344 R._Paper = Paper;
371 R.fn = paperproto = Paper.prototype = R.prototype;
372 R._id = 0;
383 R.is = function (o, type) {
423 R.angle = function (x1, y1, x2, y2, x3, y3) {
432 return R.angle(x1, y1, x3, y3) - R.angle(x2, y2, x3, y3);
444 R.rad = function (deg) {
456 R.deg = function (rad) {
470 R.snapTo = function (values, value, tolerance) {
471 tolerance = R.is(tolerance, "finite") ? tolerance : 10;
472 if (R.is(values, array)) {
496 var createUUID = R.createUUID = (function (uuidRegEx, uuidReplacer) {
514 R.setWindow = function (newwin) {
515 eve("raphael.setWindow", R, g.win, newwin);
518 if (R._engine.initWin) {
519 R._engine.initWin(g.win);
523 if (R.vml) {
532 } catch(e) {
542 } catch(e) {
568 if (g == null && R.is(r, "object") && "r" in r && "g" in r && "b" in r) {
573 if (g == null && R.is(r, string)) {
574 var clr = R.getRGB(r);
595 hex: R.rgb(r, g, b),
598 R.is(o, "finite") && (rgb.opacity = o);
622 R.color = function (clr) {
624 if (R.is(clr, "object") && "h" in clr && "s" in clr && "b" in clr) {
625 rgb = R.hsb2rgb(clr);
630 } else if (R.is(clr, "object") && "h" in clr && "s" in clr && "l" in clr) {
631 rgb = R.hsl2rgb(clr);
637 if (R.is(clr, "string")) {
638 clr = R.getRGB(clr);
640 if (R.is(clr, "object") && "r" in clr && "g" in clr && "b" in clr) {
641 rgb = R.rgb2hsl(clr);
645 rgb = R.rgb2hsb(clr);
672 R.hsb2rgb = function (h, s, v, o) {
680 var R, G, B, X, C;
684 R = G = B = v - C;
687 R += [C, X, 0, 0, X, C][h];
690 return packageRGB(R, G, B, o);
709 R.hsl2rgb = function (h, s, l, o) {
721 var R, G, B, X, C;
725 R = G = B = l - C / 2;
728 R += [C, X, 0, 0, X, C][h];
731 return packageRGB(R, G, B, o);
749 R.rgb2hsb = function (r, g, b) {
783 R.rgb2hsl = function (r, g, b) {
804 R._path2string = function () {
830 var preload = R._preload = function (src, f) {
876 R.getRGB = cacher(function (colour) {
925 return R.hsb2rgb(red, green, blue, opacity);
938 return R.hsl2rgb(red, green, blue, opacity);
942 R.is(opacity, "finite") && (rgb.opacity = opacity);
946 }, R);
958 R.hsb = cacher(function (h, s, b) {
959 return R.hsb2rgb(h, s, b).hex;
972 R.hsl = cacher(function (h, s, l) {
973 return R.hsl2rgb(h, s, l).hex;
986 R.rgb = cacher(function (r, g, b) {
999 R.getColor = function (value) {
1016 R.getColor.reset = function () {
1069 R.parsePathString = function (pathString) {
1080 if (R.is(pathString, array) && R.is(pathString[0], array)) { // rough assumption
1105 data.toString = R._path2string;
1120 R.parseTransformString = cacher(function (TString) {
1126 if (R.is(TString, array) && R.is(TString[0], array)) { // rough assumption
1139 data.toString = R._path2string;
1210 R.findDotsAtSegment = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t) {
1268 R.bezierBBox = function (p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
1269 if (!R.is(p1x, "array")) {
1295 R.isPointInsideBBox = function (bbox, x, y) {
1310 R.isBBoxIntersect = function (bbox1, bbox2) {
1311 var i = R.isPointInsideBBox;
1355 e = .01;
1357 while (abs(l - ll) > e) {
1405 var bbox1 = R.bezierBBox(bez1),
1406 bbox2 = R.bezierBBox(bez2);
1407 if (!R.isBBoxIntersect(bbox1, bbox2)) {
1419 var p = R.findDotsAtSegment.apply(R, bez1.concat(i / n1));
1423 p = R.findDotsAtSegment.apply(R, bez2.concat(i / n2));
1483 R.pathIntersection = function (path1, path2) {
1486 R.pathIntersectionNumber = function (path1, path2) {
1490 path1 = R._path2curve(path1);
1491 path2 = R._path2curve(path2);
1555 R.isPointInsidePath = function (path, x, y) {
1556 var bbox = R.pathBBox(path);
1557 return R.isPointInsideBBox(bbox, x, y) &&
1560 R._removedFactory = function (methodname) {
1586 var pathDimensions = R.pathBBox = function (path) {
1636 res.toString = R._path2string;
1639 pathToRelative = R._pathToRelative = function (pathArray) {
1644 … if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption
1645 pathArray = R.parsePathString(pathArray);
1714 res.toString = R._path2string;
1718 pathToAbsolute = R._pathToAbsolute = function (pathArray) {
1723 … if (!R.is(pathArray, array) || !R.is(pathArray && pathArray[0], array)) { // rough assumption
1724 pathArray = R.parsePathString(pathArray);
1811 res.toString = R._path2string;
1969 path2curve = R._path2curve = cacher(function (path, path2) {
2110 parseDots = R._parseDots = cacher(function (gradient) {
2115 dot.color = R.getRGB(par[1]);
2148 tear = R._tear = function (el, paper) {
2154 tofront = R._tofront = function (el, paper) {
2164 toback = R._toback = function (el, paper) {
2174 insertafter = R._insertafter = function (el, el2, paper) {
2182 insertbefore = R._insertbefore = function (el, el2, paper) {
2202 toMatrix = R.toMatrix = function (path, transform) {
2227 transformPath = R.transformPath = function (path, transform) {
2230 extractTransform = R._extractTransform = function (el, tstr) {
2235 var tdata = R.parseTransformString(tstr),
2317 _.dx = dx = m.e;
2346 equaliseTransform = R._equaliseTransform = function (t1, t2) {
2348 t1 = R.parseTransformString(t1) || [];
2349 t2 = R.parseTransformString(t2) || [];
2376 R._getContainer = function (x, y, w, h) {
2378 container = h == null && !R.is(x, "object") ? g.doc.getElementById(x) : x;
2416 R.pathToRelative = pathToRelative;
2417 R._engine = {};
2429 R.path2curve = path2curve;
2446 R.matrix = function (a, b, c, d, e, f) { argument
2447 return new Matrix(a, b, c, d, e, f);
2449 function Matrix(a, b, c, d, e, f) { argument
2455 this.e = +e;
2462 this.e = 0;
2482 matrixproto.add = function (a, b, c, d, e, f) { argument
2484 m = [[this.a, this.c, this.e], [this.b, this.d, this.f], [0, 0, 1]],
2485 matrix = [[a, c, e], [b, d, f], [0, 0, 1]],
2489 matrix = [[a.a, a.c, a.e], [a.b, a.d, a.f], [0, 0, 1]];
2505 this.e = out[0][2];
2518 …e.d / x, -me.b / x, -me.c / x, me.a / x, (me.c * me.f - me.d * me.e) / x, (me.b * me.e - me.a * me…
2528 return new Matrix(this.a, this.b, this.c, this.d, this.e, this.f);
2570 a = R.rad(a);
2589 return x * this.a + y * this.c + this.e;
2608 return R.svg ?
2618 return [this.e.toFixed(4), this.f.toFixed(4)];
2645 out.dx = this.e;
2664 out.rotate = R.deg(math.acos(cos));
2669 out.rotate = R.deg(math.asin(sin));
2711 getEventPosition = function (e) { argument
2716 x: e.clientX + scrollX,
2717 y: e.clientY + scrollY
2723 var f = function (e) { argument
2724 var pos = getEventPosition(e);
2725 return fn.call(element, e, pos.x, pos.y);
2730 var _f = function (e) { argument
2731 var pos = getEventPosition(e),
2732 olde = e;
2734 … for (var i = 0, ii = e.targetTouches && e.targetTouches.length; i < ii; i++) {
2735 if (e.targetTouches[i].target == obj) {
2736 e = e.targetTouches[i];
2737 e.originalEvent = olde;
2738 e.preventDefault = preventTouch;
2739 e.stopPropagation = stopTouch;
2744 return fn.call(element, e, pos.x, pos.y);
2760 var f = function (e) { argument
2761 e = e || g.win.event;
2764 x = e.clientX + scrollX,
2765 y = e.clientY + scrollY;
2766 e.preventDefault = e.preventDefault || preventDefault;
2767 e.stopPropagation = e.stopPropagation || stopPropagation;
2768 return fn.call(element, e, x, y);
2780 dragMove = function (e) { argument
2781 var x = e.clientX,
2782 y = e.clientY,
2789 if (supportsTouch && e.touches) {
2790 var i = e.touches.length,
2793 touch = e.touches[i];
2797 (e.originalEvent ? e.originalEvent : e).preventDefault();
2802 e.preventDefault();
2817 … + dragi.el.id, dragi.move_scope || dragi.el, x - dragi.el._drag.x, y - dragi.el._drag.y, x, y, e);
2820 dragUp = function (e) { argument
2821 R.unmousemove(dragMove).unmouseup(dragUp);
2827 …drag.end." + dragi.el.id, dragi.end_scope || dragi.start_scope || dragi.move_scope || dragi.el, e);
2845 elproto = R.el = {};
3056 R[eventName] = elproto[eventName] = function (fn, scope) {
3057 if (R.is(fn, "function")) {
3063 R["un" + eventName] = elproto["un" + eventName] = function (fn) {
3067 … if (events[l].name == eventName && (R.is(fn, "undefined") || events[l].f == fn)) {
3109 if (R.is(key, "object")) {
3210 function start(e) { argument
3211 (e.originalEvent || e).preventDefault();
3212 var x = e.clientX,
3213 y = e.clientY,
3216 this._drag.id = e.identifier;
3217 if (supportsTouch && e.touches) {
3218 var i = e.touches.length, touch;
3220 touch = e.touches[i];
3231 !drag.length && R.mousemove(dragMove).mouseup(dragUp);
3236 …"raphael.drag.start." + this.id, start_scope || move_scope || this, this._drag.x, this._drag.y, e);
3267 !draggable.length && R.unmousemove(dragMove).unmouseup(dragUp);
3287 var out = R._engine.circle(this, x || 0, y || 0, r || 0);
3313 var out = R._engine.rect(this, x || 0, y || 0, w || 0, h || 0, r || 0);
3335 var out = R._engine.ellipse(this, x || 0, y || 0, rx || 0, ry || 0);
3372 pathString && !R.is(pathString, string) && !R.is(pathString[0], array) && (pathString += E);
3373 var out = R._engine.path(R.format[apply](R, arguments), this);
3396 var out = R._engine.image(this, src || "about:blank", x || 0, y || 0, w || 0, h || 0);
3417 var out = R._engine.text(this, x || 0, y || 0, Str(text));
3439 …!R.is(itemsArray, "array") && (itemsArray = Array.prototype.splice.call(arguments, 0, arguments.le…
3503 return R._engine.setSize.call(this, width, height);
3521 return R._engine.setViewBox.call(this, x, y, w, h, fit);
3542 paperproto.raphael = R;
3610 if (R.isBBoxIntersect(el.getBBox(), bbox)) {
3708 rp = R.transformPath(rp, this.attr('transform'));
3710 return R.isPointInsidePath(rp, x, y);
3827 …return R.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, getTatLen(p1x, p1y, c1x, c1y, c…
3866 …point = istotal ? len : subpath ? subpaths : R.findDotsAtSegment(x, y, p[0], p[1], p[2], p[3], p[4…
3886 R.getTotalLength = getTotalLength;
3905 R.getPointAtLength = getPointAtLength;
3920 R.getSubpath = function (path, from, to) {
3981 getPath = R._getPath[this.type];
4012 return R.getSubpath(path, from, to);
4031 var ef = R.easing_formulas = {
4108 var e = animationElements[l];
4109 if (e.el.removed || e.paused) {
4112 var time = Now - e.start,
4113 ms = e.ms,
4114 easing = e.easing,
4115 from = e.from,
4116 diff = e.diff,
4117 to = e.to,
4118 t = e.t,
4119 that = e.el,
4124 if (e.initstatus) {
4125 time = (e.initstatus * e.anim.top - e.prev) / (e.percent - e.prev) * ms;
4126 e.status = e.initstatus;
4127 delete e.initstatus;
4128 e.stop && animationElements.splice(l--, 1);
4130 e.status = (e.prev + (e.percent - e.prev) * (time / ms)) / e.anim.top;
4202 })(that.id, that, e.anim);
4208 R.is(f, "function") && f.call(el);
4210 })(e.callback, that, e.anim);
4213 if (e.repeat > 1 && !e.next) {
4215 init[key] = e.totalOrigin[key];
4217 e.el.attr(init);
4218 … runAnimation(e.anim, e.el, e.anim.percents[0], null, e.totalOrigin, e.repeat - 1);
4220 if (e.next && !e.stop) {
4221 runAnimation(e.anim, e.el, e.next, null, e.totalOrigin, e.repeat);
4257 var a = params instanceof Animation ? params : R.animation(params, ms, easing, callback),
4399 var e = animationElements[i];
4400 if (e.el.id == element.id && e.anim == anim) {
4401 if (e.percent != percent) {
4405 isInAnim = e;
4407 element.attr(e.totalOrigin);
4440 from[attr] = R.getRGB(from[attr]);
4441 var toColour = R.getRGB(to[attr]);
4487 m.e,
4497 (to2.matrix.e - m.e) / ms,
4538 easyeasy = R.easing_formulas[easing];
4551 e = { variable
4572 animationElements.push(e);
4574 e.stop = true;
4575 e.start = new Date - ms * status;
4581 e.start = new Date - e.ms * status;
4606 R.animation = function (params, ms, easing, callback) {
4610 if (R.is(easing, "function") || !easing) {
4668 var anim = params instanceof Animation ? params : R.animation(params, ms, easing, callback);
4719 e;
4726 e = animationElements[i]; property
4727 if (e.el.id == this.id && (!anim || e.anim == anim)) {
4729 return e.status;
4732 anim: e.anim,
4733 status: e.status
4777 var e = animationElements[i];
4778 if (eve("raphael.anim.resume." + this.id, this, e.anim) !== false) {
4779 delete e.paused;
4780 this.status(e.anim, e.status);
4895 if (name && R.is(name, array) && R.is(name[0], "object")) {
4974 (R.is(easing, "function") || !easing) && (callback = easing || null);
4986 easing = R.is(easing, string) ? easing : collector;
4987 var anim = R.animation(params, ms, easing, collector);
5090 R.registerFont = function (font) {
5149 if (!R.fonts) {
5152 var font = R.fonts[family];
5155 for (var fontName in R.fonts) if (R.fonts[has](fontName)) {
5157 font = R.fonts[fontName];
5203 R.is(font, "string") && (font = this.getFont(font));
5224 …path += R.transformPath(curr.d, ["t", shift * scale, shifty * scale, "s", scale, scale, top, heigh…
5263 if (R.is(json, "array")) {
5295 R.format = function (token, params) {
5296 var args = R.is(params, array) ? [0][concat](params) : arguments;
5297 …token && R.is(token, string) && args.length - 1 && (token = token.replace(formatrg, function (str,…
5325 R.fullfill = (function () {
5362 R.ninja = function () {
5370 } catch(e) {}
5372 return R;
5394 R.st = setproto;
5410 (/in/).test(doc.readyState) ? setTimeout(isLoaded, 9) : R.eve("raphael.DOMload");
5415 return R;