Accidently reverted ast pull request merge

master
Dmitry Baranovskiy 2013-11-19 18:31:04 +11:00
parent b324696ef0
commit 4396f201bd
4 changed files with 231 additions and 47 deletions

File diff suppressed because one or more lines are too long

28
dist/snap.svg.js vendored
View File

@ -2400,6 +2400,20 @@ function arrayFirstValue(arr) {
el.paper = this.paper;
return this;
};
/*\
* Element.appendTo
[ method ]
**
* Appends the current element to the given one
**
- el (Element) parent element to append to
= (Element) the child element
\*/
elproto.appendTo = function (el) {
el = wrap(el);
el.append(this);
return this;
};
/*\
* Element.prepend
[ method ]
@ -2415,6 +2429,20 @@ function arrayFirstValue(arr) {
el.paper = this.paper;
return this;
};
/*\
* Element.prependTo
[ method ]
**
* Prepends the current element to the given one
**
- el (Element) parent element to prepend to
= (Element) the child element
\*/
elproto.prependTo = function (el) {
el = wrap(el);
el.prepend(this);
return this;
};
/*\
* Element.before
[ method ]

View File

@ -87,6 +87,10 @@
<a href="#Element.append" class="dr-method"><span>Element.append()</span></a>
</li>
<li class="dr-lvl1">
<a href="#Element.appendTo" class="dr-method"><span>Element.appendTo()</span></a>
</li>
<li class="dr-lvl1">
<a href="#Element.asPX" class="dr-method"><span>Element.asPX()</span></a>
</li>
@ -191,6 +195,10 @@
<a href="#Element.prepend" class="dr-method"><span>Element.prepend()</span></a>
</li>
<li class="dr-lvl1">
<a href="#Element.prependTo" class="dr-method"><span>Element.prependTo()</span></a>
</li>
<li class="dr-lvl1">
<a href="#Element.remove" class="dr-method"><span>Element.remove()</span></a>
</li>
@ -3969,13 +3977,73 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
</div>
</section>
</article>
<article id="Element.appendTo">
<header>
<h3 class="dr-method">Element.appendTo(el)<a href="#Element.appendTo" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1664 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1664">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.appendTo-extra"></div>
<div class="dr-method">
<p>Appends the current element to the given one
</p>
<div class="topcoat-list__container">
<h3 class="topcoat-list__header">Parameters</h3>
<ol class="topcoat-list">
<li class="topcoat-list__item"><span class="dr-param">el</span>
<span class="dr-type"><em class="dr-type-Element">Element</em> </span>
<span class="dr-description">parent element to append to</span></li>
</ol>
</div>
<p class="dr-returns">
<strong class="dr-title">Returns:</strong>
<em class="dr-type-Element">Element</em>
<span class="dr-description">the child element</span>
</p>
</div>
</section>
</article>
<article id="Element.prepend">
<header>
<h3 class="dr-method">Element.prepend(el)<a href="#Element.prepend" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1664 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1664">&#x27ad;</a></h3>
<h3 class="dr-method">Element.prepend(el)<a href="#Element.prepend" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1678 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1678">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.prepend-extra"></div>
@ -4029,13 +4097,73 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
</div>
</section>
</article>
<article id="Element.prependTo">
<header>
<h3 class="dr-method">Element.prependTo(el)<a href="#Element.prependTo" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1693 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1693">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.prependTo-extra"></div>
<div class="dr-method">
<p>Prepends the current element to the given one
</p>
<div class="topcoat-list__container">
<h3 class="topcoat-list__header">Parameters</h3>
<ol class="topcoat-list">
<li class="topcoat-list__item"><span class="dr-param">el</span>
<span class="dr-type"><em class="dr-type-Element">Element</em> </span>
<span class="dr-description">parent element to prepend to</span></li>
</ol>
</div>
<p class="dr-returns">
<strong class="dr-title">Returns:</strong>
<em class="dr-type-Element">Element</em>
<span class="dr-description">the child element</span>
</p>
</div>
</section>
</article>
<article id="Element.before">
<header>
<h3 class="dr-method">Element.before(el)<a href="#Element.before" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1679 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1679">&#x27ad;</a></h3>
<h3 class="dr-method">Element.before(el)<a href="#Element.before" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1707 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1707">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.before-extra"></div>
@ -4095,7 +4223,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.after">
<header>
<h3 class="dr-method">Element.after(el)<a href="#Element.after" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1695 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1695">&#x27ad;</a></h3>
<h3 class="dr-method">Element.after(el)<a href="#Element.after" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1723 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1723">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.after-extra"></div>
@ -4155,7 +4283,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.insertBefore">
<header>
<h3 class="dr-method">Element.insertBefore(el)<a href="#Element.insertBefore" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1710 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1710">&#x27ad;</a></h3>
<h3 class="dr-method">Element.insertBefore(el)<a href="#Element.insertBefore" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1738 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1738">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.insertBefore-extra"></div>
@ -4215,7 +4343,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.insertAfter">
<header>
<h3 class="dr-method">Element.insertAfter(el)<a href="#Element.insertAfter" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1725 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1725">&#x27ad;</a></h3>
<h3 class="dr-method">Element.insertAfter(el)<a href="#Element.insertAfter" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1753 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1753">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.insertAfter-extra"></div>
@ -4275,7 +4403,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.remove">
<header>
<h3 class="dr-method">Element.remove()<a href="#Element.remove" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1738 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1738">&#x27ad;</a></h3>
<h3 class="dr-method">Element.remove()<a href="#Element.remove" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1766 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1766">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.remove-extra"></div>
@ -4317,7 +4445,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.select">
<header>
<h3 class="dr-method">Element.select(query)<a href="#Element.select" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1753 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1753">&#x27ad;</a></h3>
<h3 class="dr-method">Element.select(query)<a href="#Element.select" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1781 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1781">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.select-extra"></div>
@ -4377,7 +4505,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.selectAll">
<header>
<h3 class="dr-method">Element.selectAll(query)<a href="#Element.selectAll" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1765 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1765">&#x27ad;</a></h3>
<h3 class="dr-method">Element.selectAll(query)<a href="#Element.selectAll" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1793 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1793">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.selectAll-extra"></div>
@ -4439,7 +4567,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.asPX">
<header>
<h3 class="dr-method">Element.asPX(attr, [value])<a href="#Element.asPX" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1783 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1783">&#x27ad;</a></h3>
<h3 class="dr-method">Element.asPX(attr, [value])<a href="#Element.asPX" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1811 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1811">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.asPX-extra"></div>
@ -4502,7 +4630,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.use">
<header>
<h3 class="dr-method">Element.use()<a href="#Element.use" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1798 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1798">&#x27ad;</a></h3>
<h3 class="dr-method">Element.use()<a href="#Element.use" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1826 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1826">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.use-extra"></div>
@ -4544,7 +4672,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.clone">
<header>
<h3 class="dr-method">Element.clone()<a href="#Element.clone" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1827 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1827">&#x27ad;</a></h3>
<h3 class="dr-method">Element.clone()<a href="#Element.clone" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1855 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1855">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.clone-extra"></div>
@ -4586,7 +4714,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.toDefs">
<header>
<h3 class="dr-method">Element.toDefs()<a href="#Element.toDefs" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1907 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1907">&#x27ad;</a></h3>
<h3 class="dr-method">Element.toDefs()<a href="#Element.toDefs" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1935 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1935">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.toDefs-extra"></div>
@ -4628,7 +4756,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.pattern">
<header>
<h3 class="dr-method">Element.pattern(x, y, width, height)<a href="#Element.pattern" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1937 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1937">&#x27ad;</a></h3>
<h3 class="dr-method">Element.pattern(x, y, width, height)<a href="#Element.pattern" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1965 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1965">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.pattern-extra"></div>
@ -4728,7 +4856,7 @@ c.attr({
<article id="Element.marker">
<header>
<h3 class="dr-method">Element.marker(x, y, width, height, refX, refY)<a href="#Element.marker" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1978 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1978">&#x27ad;</a></h3>
<h3 class="dr-method">Element.marker(x, y, width, height, refX, refY)<a href="#Element.marker" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2006 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2006">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.marker-extra"></div>
@ -4815,7 +4943,7 @@ To create a marker you have to specify the bounding rect and reference point:
<article id="Snap.animation">
<header>
<h3 class="dr-method">Snap.animation(attr, duration, [easing], [callback])<a href="#Snap.animation" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2037 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2037">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.animation(attr, duration, [easing], [callback])<a href="#Snap.animation" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2065 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2065">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.animation-extra"></div>
@ -4884,7 +5012,7 @@ To create a marker you have to specify the bounding rect and reference point:
<article id="Element.inAnim">
<header>
<h3 class="dr-method">Element.inAnim()<a href="#Element.inAnim" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2054 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2054">&#x27ad;</a></h3>
<h3 class="dr-method">Element.inAnim()<a href="#Element.inAnim" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2082 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2082">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.inAnim-extra"></div>
@ -4978,7 +5106,7 @@ To create a marker you have to specify the bounding rect and reference point:
<article id="Snap.animate">
<header>
<h3 class="dr-method">Snap.animate(from, to, setter, duration, [easing], [callback])<a href="#Snap.animate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2103 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2103">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.animate(from, to, setter, duration, [easing], [callback])<a href="#Snap.animate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2131 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2131">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.animate-extra"></div>
@ -5139,7 +5267,7 @@ rect.animate({x: 10}, 1000);</code></pre></section>
<article id="Element.stop">
<header>
<h3 class="dr-method">Element.stop()<a href="#Element.stop" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2121 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2121">&#x27ad;</a></h3>
<h3 class="dr-method">Element.stop()<a href="#Element.stop" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2149 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2149">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.stop-extra"></div>
@ -5181,7 +5309,7 @@ rect.animate({x: 10}, 1000);</code></pre></section>
<article id="Element.animate">
<header>
<h3 class="dr-method">Element.animate(attrs, duration, [easing], [callback])<a href="#Element.animate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2142 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2142">&#x27ad;</a></h3>
<h3 class="dr-method">Element.animate(attrs, duration, [easing], [callback])<a href="#Element.animate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2170 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2170">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.animate-extra"></div>
@ -5250,7 +5378,7 @@ rect.animate({x: 10}, 1000);</code></pre></section>
<article id="Element.data">
<header>
<h3 class="dr-method">Element.data(key, [value])<a href="#Element.data" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2214 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2214">&#x27ad;</a></h3>
<h3 class="dr-method">Element.data(key, [value])<a href="#Element.data" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2242 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2242">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.data-extra"></div>
@ -5372,7 +5500,7 @@ with <code>data-</code> attributes)
<article id="Element.removeData">
<header>
<h3 class="dr-method">Element.removeData([key])<a href="#Element.removeData" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2239 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2239">&#x27ad;</a></h3>
<h3 class="dr-method">Element.removeData([key])<a href="#Element.removeData" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2267 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2267">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.removeData-extra"></div>
@ -5433,7 +5561,7 @@ If key is not provided, removes all the data of the element.
<article id="undefined">
<header>
<h3 class="dr-method">undefined<a href="#undefined" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2255 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2255">&#x27ad;</a></h3>
<h3 class="dr-method">undefined<a href="#undefined" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2283 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2283">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="undefined-extra"></div>
@ -5475,7 +5603,7 @@ If key is not provided, removes all the data of the element.
<article id="Element.innerSVG">
<header>
<h3 class="dr-method">Element.innerSVG()<a href="#Element.innerSVG" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2263 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2263">&#x27ad;</a></h3>
<h3 class="dr-method">Element.innerSVG()<a href="#Element.innerSVG" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2291 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2291">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.innerSVG-extra"></div>
@ -5517,7 +5645,7 @@ If key is not provided, removes all the data of the element.
<article id="Snap.parse">
<header>
<h3 class="dr-method">Snap.parse(svg)<a href="#Snap.parse" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2302 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2302">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.parse(svg)<a href="#Snap.parse" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2330 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2330">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.parse-extra"></div>
@ -5577,7 +5705,7 @@ If key is not provided, removes all the data of the element.
<article id="Fragment.select">
<header>
<h3 class="dr-method">Fragment.select()<a href="#Fragment.select" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2325 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2325">&#x27ad;</a></h3>
<h3 class="dr-method">Fragment.select()<a href="#Fragment.select" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2353 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2353">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Fragment.select-extra"></div>
@ -5602,7 +5730,7 @@ If key is not provided, removes all the data of the element.
<article id="Fragment.selectAll">
<header>
<h3 class="dr-method">Fragment.selectAll()<a href="#Fragment.selectAll" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2332 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2332">&#x27ad;</a></h3>
<h3 class="dr-method">Fragment.selectAll()<a href="#Fragment.selectAll" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2360 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2360">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Fragment.selectAll-extra"></div>
@ -5627,7 +5755,7 @@ If key is not provided, removes all the data of the element.
<article id="Snap.fragment">
<header>
<h3 class="dr-method">Snap.fragment(varargs)<a href="#Snap.fragment" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2343 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2343">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.fragment(varargs)<a href="#Snap.fragment" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2371 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2371">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.fragment-extra"></div>
@ -5687,7 +5815,7 @@ If key is not provided, removes all the data of the element.
<article id="Paper.el">
<header>
<h3 class="dr-method">Paper.el(name, attr)<a href="#Paper.el" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2544 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2544">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.el(name, attr)<a href="#Paper.el" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2572 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2572">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.el-extra"></div>
@ -5777,7 +5905,7 @@ var c = paper.el("circle").attr({
<article id="Paper.rect">
<header>
<h3 class="dr-method">Paper.rect(x, y, width, height, [rx], [ry])<a href="#Paper.rect" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2567 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2567">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.rect(x, y, width, height, [rx], [ry])<a href="#Paper.rect" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2595 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2595">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.rect-extra"></div>
@ -5877,7 +6005,7 @@ var c = paper.rect(40, 40, 50, 50, 10);</code></pre></section>
<article id="Paper.circle">
<header>
<h3 class="dr-method">Paper.circle(x, y, r)<a href="#Paper.circle" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2604 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2604">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.circle(x, y, r)<a href="#Paper.circle" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2632 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2632">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.circle-extra"></div>
@ -5965,7 +6093,7 @@ var c = paper.rect(40, 40, 50, 50, 10);</code></pre></section>
<article id="Paper.image">
<header>
<h3 class="dr-method">Paper.image(src, x, y, width, height)<a href="#Paper.image" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2636 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2636">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.image(src, x, y, width, height)<a href="#Paper.image" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2664 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2664">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.image-extra"></div>
@ -6087,7 +6215,7 @@ var c = paper.rect(40, 40, 50, 50, 10);</code></pre></section>
<article id="Paper.ellipse">
<header>
<h3 class="dr-method">Paper.ellipse(x, y, rx, ry)<a href="#Paper.ellipse" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2679 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2679">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.ellipse(x, y, rx, ry)<a href="#Paper.ellipse" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2707 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2707">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.ellipse-extra"></div>
@ -6178,7 +6306,7 @@ var c = paper.rect(40, 40, 50, 50, 10);</code></pre></section>
<article id="Paper.path">
<header>
<h3 class="dr-method">Paper.path([pathString])<a href="#Paper.path" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2724 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2724">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.path([pathString])<a href="#Paper.path" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2752 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2752">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.path-extra"></div>
@ -6446,7 +6574,7 @@ Note: there is a special case when a path consists of only three commands: <code
<article id="Paper.g">
<header>
<h3 class="dr-method">Paper.g([varargs])<a href="#Paper.g" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2755 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2755">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.g([varargs])<a href="#Paper.g" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2783 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2783">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.g-extra"></div>
@ -6555,7 +6683,7 @@ g.add(c2, c1);</code></pre></section>
<article id="Paper.group">
<header>
<h3 class="dr-method">Paper.group()<a href="#Paper.group" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2761 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2761">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.group()<a href="#Paper.group" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2789 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2789">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.group-extra"></div>
@ -6580,7 +6708,7 @@ g.add(c2, c1);</code></pre></section>
<article id="Paper.text">
<header>
<h3 class="dr-method">Paper.text(x, y, text)<a href="#Paper.text" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2789 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2789">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.text(x, y, text)<a href="#Paper.text" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2817 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2817">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.text-extra"></div>
@ -6669,7 +6797,7 @@ var t2 = paper.text(50, 50, ["S","n","a","p"]);</code></pre></section>
<article id="Paper.line">
<header>
<h3 class="dr-method">Paper.line(x1, y1, x2, y2)<a href="#Paper.line" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2817 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2817">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.line(x1, y1, x2, y2)<a href="#Paper.line" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2845 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2845">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.line-extra"></div>
@ -6760,7 +6888,7 @@ var t2 = paper.text(50, 50, ["S","n","a","p"]);</code></pre></section>
<article id="Paper.polyline">
<header>
<h3 class="dr-method">Paper.polyline(…)<a href="#Paper.polyline" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2846 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2846">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.polyline(…)<a href="#Paper.polyline" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2874 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2874">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.polyline-extra"></div>
@ -6872,7 +7000,7 @@ var p2 = paper.polyline(10, 10, 100, 100);</code></pre></section>
<article id="Paper.polygon">
<header>
<h3 class="dr-method">Paper.polygon()<a href="#Paper.polygon" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2866 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2866">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.polygon()<a href="#Paper.polygon" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2894 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2894">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.polygon-extra"></div>
@ -6897,7 +7025,7 @@ var p2 = paper.polyline(10, 10, 100, 100);</code></pre></section>
<article id="Paper.gradient">
<header>
<h3 class="dr-method">Paper.gradient(gradient)<a href="#Paper.gradient" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2919 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2919">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.gradient(gradient)<a href="#Paper.gradient" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2947 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2947">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.gradient-extra"></div>
@ -7095,7 +7223,7 @@ half the width, from black to white:
<article id="Paper.toString">
<header>
<h3 class="dr-method">Paper.toString()<a href="#Paper.toString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2935 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2935">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.toString()<a href="#Paper.toString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2963 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2963">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.toString-extra"></div>
@ -7137,7 +7265,7 @@ half the width, from black to white:
<article id="Paper.clear">
<header>
<h3 class="dr-method">Paper.clear()<a href="#Paper.clear" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2953 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2953">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.clear()<a href="#Paper.clear" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2981 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2981">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.clear-extra"></div>
@ -7162,7 +7290,7 @@ half the width, from black to white:
<article id="Snap.ajax">
<header>
<h3 class="dr-method">Snap.ajax(…)<a href="#Snap.ajax" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2984 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2984">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.ajax(…)<a href="#Snap.ajax" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3012 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3012">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.ajax-extra"></div>
@ -7266,7 +7394,7 @@ half the width, from black to white:
<article id="Snap.load">
<header>
<h3 class="dr-method">Snap.load(url, callback, [scope])<a href="#Snap.load" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3030 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3030">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.load(url, callback, [scope])<a href="#Snap.load" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3058 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3058">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.load-extra"></div>
@ -7315,7 +7443,7 @@ half the width, from black to white:
<article id="Snap.getElementByPoint">
<header>
<h3 class="dr-method">Snap.getElementByPoint(x, y)<a href="#Snap.getElementByPoint" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3459 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3459">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.getElementByPoint(x, y)<a href="#Snap.getElementByPoint" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3487 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3487">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.getElementByPoint-extra"></div>

View File

@ -1652,6 +1652,20 @@ function arrayFirstValue(arr) {
el.paper = this.paper;
return this;
};
/*\
* Element.appendTo
[ method ]
**
* Appends the current element to the given one
**
- el (Element) parent element to append to
= (Element) the child element
\*/
elproto.appendTo = function (el) {
el = wrap(el);
el.append(this);
return this;
};
/*\
* Element.prepend
[ method ]
@ -1667,6 +1681,20 @@ function arrayFirstValue(arr) {
el.paper = this.paper;
return this;
};
/*\
* Element.prependTo
[ method ]
**
* Prepends the current element to the given one
**
- el (Element) parent element to prepend to
= (Element) the child element
\*/
elproto.prependTo = function (el) {
el = wrap(el);
el.prepend(this);
return this;
};
/*\
* Element.before
[ method ]