Lines Matching refs:el

885     ID = function (el) {  argument
886 return (el && el.type ? el.type : E) + idprefix + (idgen++).toString(36);
895 function $(el, attr) {
897 if (el == "#text") {
898 el = glob.doc.createTextNode(attr.text || attr["#text"] || "");
900 if (el == "#comment") {
901 el = glob.doc.createComment(attr.text || attr["#text"] || "");
903 if (typeof el == "string") {
904 el = $(el);
907 if (el.nodeType == 1) {
909 return el.getAttributeNS(xlink, attr.substring(6));
912 return el.getAttributeNS(xmlns, attr.substring(4));
914 return el.getAttribute(attr);
916 return el.nodeValue;
921 if (el.nodeType == 1) {
926 el.setAttributeNS(xlink, key.substring(6), val);
928 el.setAttributeNS(xmlns, key.substring(4), val);
930 el.setAttribute(key, val);
933 el.removeAttribute(key);
937 el.nodeValue = attr.text;
940 el = glob.doc.createElementNS(xmlns, el);
942 return el;
946 function getAttrs(el) {
947 var attrs = el.attributes,
1944 function getSomeDefs(el) {
1945 var p = (el.node.ownerSVGElement && wrap(el.node.ownerSVGElement)) ||
1946 (el.node.parentNode && wrap(el.node.parentNode)) ||
1956 function getSomeSVG(el) {
1957 return el.node.ownerSVGElement && wrap(el.node.ownerSVGElement) || Snap.select("svg");
1961 function unit2px(el, name, value) {
1962 var svg = getSomeSVG(el).node,
2000 out[nam] = f(el.attr(nam) || 0);
2002 out = f(value == null ? el.attr(nam) || 0 : value);
2005 switch (el.type) {
2092 list[i].forEach(function (el) {
2093 node.appendChild(el.node);
2108 var el = hub[key],
2109 node = el.node;
2110 …if (el.type != "svg" && !node.ownerSVGElement || el.type == "svg" && (!node.parentNode || "ownerSV…
2115 function Element(el) {
2116 if (el.snap in hub) {
2117 return hub[el.snap];
2121 svg = el.ownerSVGElement;
2135 this.node = el;
2145 this.type = el.tagName || el.nodeName;
2151 el.snap = id;
2188 var el = this,
2189 node = el.node;
2209 return eve("snap.util.getattr." + params, el).firstDefined();
2214 eve("snap.util.attr." + att, el, params[att]);
2217 return el;
2283 var el = wrap(res);
2284 return el;
2365 Paper.prototype.el = function (name, attr) {
2366 var el = make(name, this.node);
2367 attr && el.attr(attr);
2368 return el;
2699 var el = this,
2701 if (el.removed) {
2704 while (el.type == "use") {
2706 … m = m.add(el.transform().localMatrix.translate(el.attr("x") || 0, el.attr("y") || 0));
2708 if (el.original) {
2709 el = el.original;
2711 var href = el.attr("xlink:href");
2712el = el.original = el.node.ownerDocument.getElementById(href.substring(href.indexOf("#") + 1));
2715 var _ = el._,
2716 pathfinder = Snap.path.get[el.type] || Snap.path.get.deflt;
2719 …_.bboxwt = pathfinder ? Snap.path.getBBox(el.realPath = pathfinder(el)) : Snap._.box(el.node.getBB…
2722 el.realPath = pathfinder(el);
2723 el.matrix = el.transform().localMatrix;
2724 _.bbox = Snap.path.getBBox(Snap.path.map(el.realPath, m.add(el.matrix)));
2735 function extractTransform(el, tstr) { argument
2738 if (el.type == "linearGradient" || el.type == "radialGradient") {
2739 tstr = el.node.getAttribute("gradientTransform");
2740 } else if (el.type == "pattern") {
2741 tstr = el.node.getAttribute("patternTransform");
2743 tstr = el.node.getAttribute("transform");
2753 tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || "");
2758 el._.transform = tstr;
2760 var m = Snap._.transform2matrix(tstr, el.getBBox(1));
2764 el.matrix = m;
2863 elproto.append = elproto.add = function (el) { argument
2864 if (el) {
2865 if (el.type == "set") {
2867 el.forEach(function (el) { argument
2868 it.add(el);
2872 el = wrap(el);
2873 this.node.appendChild(el.node);
2874 el.paper = this.paper;
2887 elproto.appendTo = function (el) { argument
2888 if (el) {
2889 el = wrap(el);
2890 el.append(this);
2903 elproto.prepend = function (el) { argument
2904 if (el) {
2905 if (el.type == "set") {
2908 el.forEach(function (el) { argument
2910 first.after(el);
2912 it.prepend(el);
2914 first = el;
2918 el = wrap(el);
2919 var parent = el.parent();
2920 this.node.insertBefore(el.node, this.node.firstChild);
2922 el.paper = this.paper;
2937 elproto.prependTo = function (el) { argument
2938 el = wrap(el);
2939 el.prepend(this);
2951 elproto.before = function (el) { argument
2952 if (el.type == "set") {
2954 el.forEach(function (el) { argument
2955 var parent = el.parent();
2956 it.node.parentNode.insertBefore(el.node, it.node);
2962 el = wrap(el);
2963 var parent = el.parent();
2964 this.node.parentNode.insertBefore(el.node, this.node);
2967 el.paper = this.paper;
2979 elproto.after = function (el) { argument
2980 el = wrap(el);
2981 var parent = el.parent();
2983 this.node.parentNode.insertBefore(el.node, this.node.nextSibling);
2985 this.node.parentNode.appendChild(el.node);
2989 el.paper = this.paper;
3001 elproto.insertBefore = function (el) { argument
3002 el = wrap(el);
3004 el.node.parentNode.insertBefore(this.node, el.node);
3005 this.paper = el.paper;
3007 el.parent() && el.parent().add();
3019 elproto.insertAfter = function (el) { argument
3020 el = wrap(el);
3022 el.node.parentNode.insertBefore(this.node, el.node.nextSibling);
3023 this.paper = el.paper;
3025 el.parent() && el.parent().add();
3118 function fixids(el) { argument
3119 var els = el.selectAll("*"),
3352 var el = this,
3354 for (var id in el.anims) if (el.anims[has](id)) {
3367 }(el.anims[id]));
3450 el = this;
3452 if (el.equal) {
3453 eq = el.equal(key, Str(attrs[key]));
3458 from = +el.attr(key);
3472 el.attr(attr);
3474 el.anims[anim.id] = anim;
3477 eve("snap.animcreated." + el.id, anim);
3479 delete el.anims[anim.id];
3480 callback && callback.call(el);
3483 delete el.anims[anim.id];
3485 return el;
4065 params = params.split(/\s*,\s*/).map(function (el) { argument
4066 return +el == el ? +el : el;
4072 stops = stops.map(function (el) { argument
4073 el = el.split(":");
4075 color: el[0]
4077 if (el[1]) {
4078 out.offset = parseFloat(el[1]);
4562 el = this,
4641 return this.el("rect", attr);
4668 return this.el("circle", attr);
4709 var el = this.el("image");
4711 el.attr(src);
4726 Snap._.$(el.node, {
4732 Snap._.$(el.node, set);
4734 return el;
4763 return this.el("ellipse", attr);
4803 return this.el("path", attr);
4832 el = this.el("g");
4834 el.attr(first);
4836 el.add(Array.prototype.slice.call(arguments, 0));
4838 return el;
4878 return this.el("svg", attrs);
4891 el = this.el("mask");
4893 el.attr(first);
4895 el.add(Array.prototype.slice.call(arguments, 0));
4897 return el;
4939 return this.el("pattern", attr);
4964 return this.el("use", {"xlink:href": "#" + id});
4987 return this.el("symbol", attr);
5020 return this.el("text", attr);
5049 return this.el("line", attr);
5076 return this.el("polyline", attr);
5094 return this.el("polygon", attr);
5133 el;
5139 el = gradientLinear.apply(0, grad.params);
5141 el = gradientRadial.apply(0, grad.params);
5144 $(el.node, {
5168 el.addStop(stop.color, stop.offset);
5170 return el;
5173 var el = Snap._.make("linearGradient", defs);
5174 el.stops = Gstops;
5175 el.addStop = GaddStop;
5176 el.getBBox = GgetBBox;
5178 $(el.node, {
5185 return el;
5188 var el = Snap._.make("radialGradient", defs);
5189 el.stops = Gstops;
5190 el.addStop = GaddStop;
5191 el.getBBox = GgetBBox;
5193 $(el.node, {
5200 $(el.node, {
5205 return el;
5805 path: function (el) { argument
5806 return el.attr("path");
5808 circle: function (el) { argument
5809 var attr = unit2px(el);
5812 ellipse: function (el) { argument
5813 var attr = unit2px(el);
5816 rect: function (el) { argument
5817 var attr = unit2px(el);
5820 image: function (el) { argument
5821 var attr = unit2px(el);
5824 line: function (el) { argument
5825 return "M" + [el.attr("x1") || 0, el.attr("y1") || 0, el.attr("x2"), el.attr("y2")];
5827 polyline: function (el) { argument
5828 return "M" + el.attr("points");
5830 polygon: function (el) { argument
5831 return "M" + el.attr("points") + "z";
5833 deflt: function (el) { argument
5834 var bbox = el.node.getBBox();
6897 return this.forEach(function (el, i) { argument
6898 eve.once("snap.animcreated." + el.id, handler);
6900 args[i] && el.animate.apply(el, args[i]);
6902 el.animate(attrs, ms, easing, callbacker);
7015 setproto.exclude = function (el) { argument
7016 for (var i = 0, ii = this.length; i < ii; i++) if (this[i] == el) {
7022 setproto.insertAfter = function (el) { argument
7025 this.items[i].insertAfter(el);
7200 el = this;
7234 return el.getBBox(1);
7299 getScroll = function (xy, el) { argument
7301 doc = el && el.node ? el.node.ownerDocument : glob.doc;
7368 … if (touch.identifier == dragi.el._drag.id || dragi.el.node.contains(touch.target)) {
7378 var node = dragi.el.node,
7391 …eve("snap.drag.move." + dragi.el.id, dragi.move_scope || dragi.el, x - dragi.el._drag.x, y - dragi…
7400 dragi.el._drag = {};
7401 …eve("snap.drag.end." + dragi.el.id, dragi.end_scope || dragi.start_scope || dragi.move_scope || dr…
7402 eve.off("snap.drag.*." + dragi.el.id);
7688 var el = this;
7691 return el.drag(function (dx, dy) {
7701 el._drag.x = x;
7702 el._drag.y = y;
7703 el._drag.id = e.identifier;
7705 … drag.push({el: el, move_scope: move_scope, start_scope: start_scope, end_scope: end_scope});
7706 onstart && eve.on("snap.drag.start." + el.id, onstart);
7707 onmove && eve.on("snap.drag.move." + el.id, onmove);
7708 onend && eve.on("snap.drag.end." + el.id, onend);
7709 eve("snap.drag.start." + el.id, start_scope || move_scope || el, x, y, e);
7712 eve("snap.draginit." + el.id, el, e, x, y);
7714 eve.on("snap.draginit." + el.id, start);
7715 el._drag = {};
7716 draggable.push({el: el, start: start, init: init});
7717 el.mousedown(init);
7718 return el;
7738 while (i--) if (draggable[i].el == this) {
8110 Element.prototype.getAlign = function (el, way) { argument
8111 if (way == null && is(el, "string")) {
8112 way = el;
8113 el = null;
8115 el = el || this.paper;
8116 var bx = el.getBBox ? el.getBBox() : box(el),
8164 Element.prototype.align = function (el, way) { argument
8165 return this.transform("..." + this.getAlign(el, way));