Fix for bug #67
parent
b8c2751557
commit
6f4f847659
|
@ -31,10 +31,10 @@
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
<div id="content" class="max-width"><article id="Element" class="Element-section"><header><h2 id="Element" class="undefined">Element<a href="#Element" title="Link to this section" class="dr-hash">⚓</a></h2></header>
|
<div id="content" class="max-width"><article id="Element" class="Element-section"><header><h2 id="Element" class="undefined">Element<a href="#Element" title="Link to this section" class="dr-hash">⚓</a></h2></header>
|
||||||
<section><div class="extra" id="Element-extra"></div></section></article><article id="Element.add" class="Element-add-section"><header><h3 id="Element.add" class="dr-method">Element.add()<a href="#Element.add" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1633 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1633">➭</a></h3></header>
|
<section><div class="extra" id="Element-extra"></div></section></article><article id="Element.add" class="Element-add-section"><header><h3 id="Element.add" class="dr-method">Element.add()<a href="#Element.add" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1621 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1621">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.add-extra"></div><div class="dr-method"><p>See <a href="#Element.append" class="dr-link">Element.append</a>
|
<section><div class="extra" id="Element.add-extra"></div><div class="dr-method"><p>See <a href="#Element.append" class="dr-link">Element.append</a>
|
||||||
</p>
|
</p>
|
||||||
</div></section></article><article id="Element.after" class="Element-after-section"><header><h3 id="Element.after" class="dr-method">Element.after(el)<a href="#Element.after" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1686 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1686">➭</a></h3></header>
|
</div></section></article><article id="Element.after" class="Element-after-section"><header><h3 id="Element.after" class="dr-method">Element.after(el)<a href="#Element.after" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1674 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1674">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.after-extra"></div><div class="dr-method"><p>Inserts given element after the current one
|
<section><div class="extra" id="Element.after-extra"></div><div class="dr-method"><p>Inserts given element after the current one
|
||||||
</p>
|
</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>
|
<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>
|
||||||
|
@ -42,7 +42,7 @@
|
||||||
<span class="dr-description">element to insert</span></li>
|
<span class="dr-description">element to insert</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
|
||||||
</div></section></article><article id="Element.animate" class="Element-animate-section"><header><h3 id="Element.animate" class="dr-method">Element.animate(attrs, duration, [easing], [callback])<a href="#Element.animate" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2133 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2133">➭</a></h3></header>
|
</div></section></article><article id="Element.animate" class="Element-animate-section"><header><h3 id="Element.animate" class="dr-method">Element.animate(attrs, duration, [easing], [callback])<a href="#Element.animate" title="Link to this section" class="dr-hash">⚓</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#L2121">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.animate-extra"></div><div class="dr-method"><p>Animates the given attributes of the element
|
<section><div class="extra" id="Element.animate-extra"></div><div class="dr-method"><p>Animates the given attributes of the element
|
||||||
</p>
|
</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">attrs</span>
|
<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">attrs</span>
|
||||||
|
@ -61,7 +61,7 @@
|
||||||
<span class="dr-description">callback function that executes when the animation ends</span></li>
|
<span class="dr-description">callback function that executes when the animation ends</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the current element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the current element</span></p>
|
||||||
</div></section></article><article id="Element.append" class="Element-append-section"><header><h3 id="Element.append" class="dr-method">Element.append(el)<a href="#Element.append" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1627 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1627">➭</a></h3></header>
|
</div></section></article><article id="Element.append" class="Element-append-section"><header><h3 id="Element.append" class="dr-method">Element.append(el)<a href="#Element.append" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1615 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1615">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.append-extra"></div><div class="dr-method"><p>Appends the given element to current one
|
<section><div class="extra" id="Element.append-extra"></div><div class="dr-method"><p>Appends the given element to current one
|
||||||
</p>
|
</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>
|
<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>
|
||||||
|
@ -69,7 +69,7 @@
|
||||||
<span class="dr-description">element to append</span></li>
|
<span class="dr-description">element to append</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
|
||||||
</div></section></article><article id="Element.asPX" class="Element-asPX-section"><header><h3 id="Element.asPX" class="dr-method">Element.asPX(attr, [value])<a href="#Element.asPX" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1774 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1774">➭</a></h3></header>
|
</div></section></article><article id="Element.asPX" class="Element-asPX-section"><header><h3 id="Element.asPX" class="dr-method">Element.asPX(attr, [value])<a href="#Element.asPX" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1762 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1762">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.asPX-extra"></div><div class="dr-method"><p>Returns given attribute of the element as a <code>px</code> value (not %, em, etc.)
|
<section><div class="extra" id="Element.asPX-extra"></div><div class="dr-method"><p>Returns given attribute of the element as a <code>px</code> value (not %, em, etc.)
|
||||||
</p>
|
</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">attr</span>
|
<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">attr</span>
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
<span class="dr-description">attribute value</span></li>
|
<span class="dr-description">attribute value</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">result of query selection</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">result of query selection</span></p>
|
||||||
</div></section></article><article id="Element.attr" class="Element-attr-section"><header><h3 id="Element.attr" class="dr-method">Element.attr(…)<a href="#Element.attr" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1466 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1466">➭</a></h3></header>
|
</div></section></article><article id="Element.attr" class="Element-attr-section"><header><h3 id="Element.attr" class="dr-method">Element.attr(…)<a href="#Element.attr" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1465 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1465">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.attr-extra"></div><div class="dr-method"><p>Gets or sets given attributes of the element
|
<section><div class="extra" id="Element.attr-extra"></div><div class="dr-method"><p>Gets or sets given attributes of the element
|
||||||
</p>
|
</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">params</span>
|
<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">params</span>
|
||||||
|
@ -106,7 +106,7 @@
|
||||||
});
|
});
|
||||||
console.log(el.attr("fill")); // #fc0
|
console.log(el.attr("fill")); // #fc0
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
</div></section></article><article id="Element.before" class="Element-before-section"><header><h3 id="Element.before" class="dr-method">Element.before(el)<a href="#Element.before" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1670 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1670">➭</a></h3></header>
|
</div></section></article><article id="Element.before" class="Element-before-section"><header><h3 id="Element.before" class="dr-method">Element.before(el)<a href="#Element.before" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1658 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1658">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.before-extra"></div><div class="dr-method"><p>Inserts given element before the current one
|
<section><div class="extra" id="Element.before-extra"></div><div class="dr-method"><p>Inserts given element before the current one
|
||||||
</p>
|
</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>
|
<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>
|
||||||
|
@ -122,11 +122,11 @@ console.log(el.attr("fill")); // #fc0
|
||||||
<span class="dr-description">handler for the event</span></li>
|
<span class="dr-description">handler for the event</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
||||||
</div></section></article><article id="Element.clone" class="Element-clone-section"><header><h3 id="Element.clone" class="dr-method">Element.clone()<a href="#Element.clone" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1818 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1818">➭</a></h3></header>
|
</div></section></article><article id="Element.clone" class="Element-clone-section"><header><h3 id="Element.clone" class="dr-method">Element.clone()<a href="#Element.clone" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1806 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1806">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.clone-extra"></div><div class="dr-method"><p>Creates a clone of the element and inserts it after the element
|
<section><div class="extra" id="Element.clone-extra"></div><div class="dr-method"><p>Creates a clone of the element and inserts it after the element
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the clone</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the clone</span></p>
|
||||||
</div></section></article><article id="Element.data" class="Element-data-section"><header><h3 id="Element.data" class="dr-method">Element.data(key, [value])<a href="#Element.data" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2205 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2205">➭</a></h3></header>
|
</div></section></article><article id="Element.data" class="Element-data-section"><header><h3 id="Element.data" class="dr-method">Element.data(key, [value])<a href="#Element.data" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2193 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2193">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.data-extra"></div><div class="dr-method"><p>Adds or retrieves given value associated with given key. (Don’t confuse
|
<section><div class="extra" id="Element.data-extra"></div><div class="dr-method"><p>Adds or retrieves given value associated with given key. (Don’t confuse
|
||||||
with <code>data-</code> attributes)
|
with <code>data-</code> attributes)
|
||||||
</p>
|
</p>
|
||||||
|
@ -256,7 +256,7 @@ with <code>data-</code> attributes)
|
||||||
<ol class="dr-json"><li><span class="dr-json-key">event</span><span class="dr-type"><em class="dr-type-object">object</em></span><span class="dr-json-description">DOM event object</span>
|
<ol class="dr-json"><li><span class="dr-json-key">event</span><span class="dr-type"><em class="dr-type-object">object</em></span><span class="dr-json-description">DOM event object</span>
|
||||||
</ol>
|
</ol>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
||||||
</div></section></article><article id="Element.getBBox" class="Element-getBBox-section"><header><h3 id="Element.getBBox" class="dr-method">Element.getBBox()<a href="#Element.getBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1515 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1515">➭</a></h3></header>
|
</div></section></article><article id="Element.getBBox" class="Element-getBBox-section"><header><h3 id="Element.getBBox" class="dr-method">Element.getBBox()<a href="#Element.getBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1514 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1514">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.getBBox-extra"></div><div class="dr-method"><p>Returns the bounding box descriptor for the given element
|
<section><div class="extra" id="Element.getBBox-extra"></div><div class="dr-method"><p>Returns the bounding box descriptor for the given element
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">bounding box descriptor:</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">bounding box descriptor:</span></p>
|
||||||
|
@ -276,7 +276,7 @@ with <code>data-</code> attributes)
|
||||||
<li><span class="dr-json-key">y2:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y of the bottom edge,</span>
|
<li><span class="dr-json-key">y2:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y of the bottom edge,</span>
|
||||||
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y of the top edge</span>
|
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y of the top edge</span>
|
||||||
</ol></li><li>}</li></ol>
|
</ol></li><li>}</li></ol>
|
||||||
</div></section></article><article id="Element.getPointAtLength" class="Element-getPointAtLength-section"><header><h3 id="Element.getPointAtLength" class="dr-method">Element.getPointAtLength(length)<a href="#Element.getPointAtLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1126 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1126">➭</a></h3></header>
|
</div></section></article><article id="Element.getPointAtLength" class="Element-getPointAtLength-section"><header><h3 id="Element.getPointAtLength" class="dr-method">Element.getPointAtLength(length)<a href="#Element.getPointAtLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1134 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1134">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.getPointAtLength-extra"></div><div class="dr-method"><p>Returns coordinates of the point located at the given length on the given path (only works for <code>path</code> elements)
|
<section><div class="extra" id="Element.getPointAtLength-extra"></div><div class="dr-method"><p>Returns coordinates of the point located at the given length on the given path (only works for <code>path</code> elements)
|
||||||
</p>
|
</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">length</span>
|
<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">length</span>
|
||||||
|
@ -288,7 +288,7 @@ with <code>data-</code> attributes)
|
||||||
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate,</span>
|
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate,</span>
|
||||||
<li><span class="dr-json-key">alpha:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">angle of derivative</span>
|
<li><span class="dr-json-key">alpha:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">angle of derivative</span>
|
||||||
</ol></li><li>}</li></ol>
|
</ol></li><li>}</li></ol>
|
||||||
</div></section></article><article id="Element.getSubpath" class="Element-getSubpath-section"><header><h3 id="Element.getSubpath" class="dr-method">Element.getSubpath(from, to)<a href="#Element.getSubpath" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1141 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1141">➭</a></h3></header>
|
</div></section></article><article id="Element.getSubpath" class="Element-getSubpath-section"><header><h3 id="Element.getSubpath" class="dr-method">Element.getSubpath(from, to)<a href="#Element.getSubpath" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1149 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1149">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.getSubpath-extra"></div><div class="dr-method"><p>Returns subpath of a given element from given start and end lengths (only works for <code>path</code> elements)
|
<section><div class="extra" id="Element.getSubpath-extra"></div><div class="dr-method"><p>Returns subpath of a given element from given start and end lengths (only works for <code>path</code> elements)
|
||||||
</p>
|
</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">from</span>
|
<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">from</span>
|
||||||
|
@ -299,7 +299,7 @@ with <code>data-</code> attributes)
|
||||||
<span class="dr-description">length, in pixels, from the start of the path to the end of the segment</span></li>
|
<span class="dr-description">length, in pixels, from the start of the path to the end of the segment</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">path string definition for the segment</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">path string definition for the segment</span></p>
|
||||||
</div></section></article><article id="Element.getTotalLength" class="Element-getTotalLength-section"><header><h3 id="Element.getTotalLength" class="dr-method">Element.getTotalLength()<a href="#Element.getTotalLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1105 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1105">➭</a></h3></header>
|
</div></section></article><article id="Element.getTotalLength" class="Element-getTotalLength-section"><header><h3 id="Element.getTotalLength" class="dr-method">Element.getTotalLength()<a href="#Element.getTotalLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1113 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1113">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.getTotalLength-extra"></div><div class="dr-method"><p>Returns the length of the path in pixels (only works for <code>path</code> elements)
|
<section><div class="extra" id="Element.getTotalLength-extra"></div><div class="dr-method"><p>Returns the length of the path in pixels (only works for <code>path</code> elements)
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">length</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">length</span></p>
|
||||||
|
@ -322,7 +322,7 @@ with <code>data-</code> attributes)
|
||||||
<span class="dr-description">context for hover out handler</span></li>
|
<span class="dr-description">context for hover out handler</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
||||||
</div></section></article><article id="Element.inAnim" class="Element-inAnim-section"><header><h3 id="Element.inAnim" class="dr-method">Element.inAnim()<a href="#Element.inAnim" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2045 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2045">➭</a></h3></header>
|
</div></section></article><article id="Element.inAnim" class="Element-inAnim-section"><header><h3 id="Element.inAnim" class="dr-method">Element.inAnim()<a href="#Element.inAnim" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2033 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2033">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.inAnim-extra"></div><div class="dr-method"><p>Returns a set of animations that may be able to manipulate the current element
|
<section><div class="extra" id="Element.inAnim-extra"></div><div class="dr-method"><p>Returns a set of animations that may be able to manipulate the current element
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">in format:</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">in format:</span></p>
|
||||||
|
@ -331,11 +331,11 @@ with <code>data-</code> attributes)
|
||||||
<li><span class="dr-json-key">status</span><span class="dr-type"><em class="dr-type-function">function</em></span><span class="dr-json-description">gets or sets the status of the animation,</span>
|
<li><span class="dr-json-key">status</span><span class="dr-type"><em class="dr-type-function">function</em></span><span class="dr-json-description">gets or sets the status of the animation,</span>
|
||||||
<li><span class="dr-json-key">stop</span><span class="dr-type"><em class="dr-type-function">function</em></span><span class="dr-json-description">stops the animation</span>
|
<li><span class="dr-json-key">stop</span><span class="dr-type"><em class="dr-type-function">function</em></span><span class="dr-json-description">stops the animation</span>
|
||||||
</ol></li><li>}</li></ol>
|
</ol></li><li>}</li></ol>
|
||||||
</div></section></article><article id="Element.innerSVG" class="Element-innerSVG-section"><header><h3 id="Element.innerSVG" class="dr-method">Element.innerSVG()<a href="#Element.innerSVG" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2254 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2254">➭</a></h3></header>
|
</div></section></article><article id="Element.innerSVG" class="Element-innerSVG-section"><header><h3 id="Element.innerSVG" class="dr-method">Element.innerSVG()<a href="#Element.innerSVG" title="Link to this section" class="dr-hash">⚓</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#L2242">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.innerSVG-extra"></div><div class="dr-method"><p>Returns SVG code for the element's contents, equivalent to HTML's <code>innerHTML</code>
|
<section><div class="extra" id="Element.innerSVG-extra"></div><div class="dr-method"><p>Returns SVG code for the element's contents, equivalent to HTML's <code>innerHTML</code>
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">SVG code for the element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">SVG code for the element</span></p>
|
||||||
</div></section></article><article id="Element.insertAfter" class="Element-insertAfter-section"><header><h3 id="Element.insertAfter" class="dr-method">Element.insertAfter(el)<a href="#Element.insertAfter" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1716 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1716">➭</a></h3></header>
|
</div></section></article><article id="Element.insertAfter" class="Element-insertAfter-section"><header><h3 id="Element.insertAfter" class="dr-method">Element.insertAfter(el)<a href="#Element.insertAfter" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1704 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1704">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.insertAfter-extra"></div><div class="dr-method"><p>Inserts the element after the given one
|
<section><div class="extra" id="Element.insertAfter-extra"></div><div class="dr-method"><p>Inserts the element after the given one
|
||||||
</p>
|
</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>
|
<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>
|
||||||
|
@ -343,7 +343,7 @@ with <code>data-</code> attributes)
|
||||||
<span class="dr-description">element next to whom insert to</span></li>
|
<span class="dr-description">element next to whom insert to</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
|
||||||
</div></section></article><article id="Element.insertBefore" class="Element-insertBefore-section"><header><h3 id="Element.insertBefore" class="dr-method">Element.insertBefore(el)<a href="#Element.insertBefore" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1701 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1701">➭</a></h3></header>
|
</div></section></article><article id="Element.insertBefore" class="Element-insertBefore-section"><header><h3 id="Element.insertBefore" class="dr-method">Element.insertBefore(el)<a href="#Element.insertBefore" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1689 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1689">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.insertBefore-extra"></div><div class="dr-method"><p>Inserts the element after the given one
|
<section><div class="extra" id="Element.insertBefore-extra"></div><div class="dr-method"><p>Inserts the element after the given one
|
||||||
</p>
|
</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>
|
<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>
|
||||||
|
@ -351,7 +351,7 @@ with <code>data-</code> attributes)
|
||||||
<span class="dr-description">element next to whom insert to</span></li>
|
<span class="dr-description">element next to whom insert to</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
|
||||||
</div></section></article><article id="Element.marker" class="Element-marker-section"><header><h3 id="Element.marker" class="dr-method">Element.marker(x, y, width, height, refX, refY)<a href="#Element.marker" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1969 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1969">➭</a></h3></header>
|
</div></section></article><article id="Element.marker" class="Element-marker-section"><header><h3 id="Element.marker" class="dr-method">Element.marker(x, y, width, height, refX, refY)<a href="#Element.marker" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1957 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1957">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.marker-extra"></div><div class="dr-method"><p>Creates a <code><marker></code> element from the current element
|
<section><div class="extra" id="Element.marker-extra"></div><div class="dr-method"><p>Creates a <code><marker></code> element from the current element
|
||||||
To create a marker you have to specify the bounding rect and reference point:
|
To create a marker you have to specify the bounding rect and reference point:
|
||||||
</p>
|
</p>
|
||||||
|
@ -417,11 +417,11 @@ To create a marker you have to specify the bounding rect and reference point:
|
||||||
<span class="dr-description">handler for the event</span></li>
|
<span class="dr-description">handler for the event</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
||||||
</div></section></article><article id="Element.parent" class="Element-parent-section"><header><h3 id="Element.parent" class="dr-method">Element.parent()<a href="#Element.parent" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1615 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1615">➭</a></h3></header>
|
</div></section></article><article id="Element.parent" class="Element-parent-section"><header><h3 id="Element.parent" class="dr-method">Element.parent()<a href="#Element.parent" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1603 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1603">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.parent-extra"></div><div class="dr-method"><p>Returns the element's parent
|
<section><div class="extra" id="Element.parent-extra"></div><div class="dr-method"><p>Returns the element's parent
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
|
||||||
</div></section></article><article id="Element.pattern" class="Element-pattern-section"><header><h3 id="Element.pattern" class="dr-method">Element.pattern(x, y, width, height)<a href="#Element.pattern" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1928 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1928">➭</a></h3></header>
|
</div></section></article><article id="Element.pattern" class="Element-pattern-section"><header><h3 id="Element.pattern" class="dr-method">Element.pattern(x, y, width, height)<a href="#Element.pattern" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1916 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1916">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.pattern-extra"></div><div class="dr-method"><p>Creates a <code><pattern></code> element from the current element
|
<section><div class="extra" id="Element.pattern-extra"></div><div class="dr-method"><p>Creates a <code><pattern></code> element from the current element
|
||||||
To create a pattern you have to specify the pattern rect:
|
To create a pattern you have to specify the pattern rect:
|
||||||
</p>
|
</p>
|
||||||
|
@ -451,7 +451,7 @@ c.attr({
|
||||||
fill: p
|
fill: p
|
||||||
});
|
});
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
</div></section></article><article id="Element.prepend" class="Element-prepend-section"><header><h3 id="Element.prepend" class="dr-method">Element.prepend(el)<a href="#Element.prepend" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1655 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1655">➭</a></h3></header>
|
</div></section></article><article id="Element.prepend" class="Element-prepend-section"><header><h3 id="Element.prepend" class="dr-method">Element.prepend(el)<a href="#Element.prepend" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1643 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1643">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.prepend-extra"></div><div class="dr-method"><p>Prepends the given element to the current one
|
<section><div class="extra" id="Element.prepend-extra"></div><div class="dr-method"><p>Prepends the given element to the current one
|
||||||
</p>
|
</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>
|
<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>
|
||||||
|
@ -459,11 +459,11 @@ c.attr({
|
||||||
<span class="dr-description">element to prepend</span></li>
|
<span class="dr-description">element to prepend</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
|
||||||
</div></section></article><article id="Element.remove" class="Element-remove-section"><header><h3 id="Element.remove" class="dr-method">Element.remove()<a href="#Element.remove" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1729 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1729">➭</a></h3></header>
|
</div></section></article><article id="Element.remove" class="Element-remove-section"><header><h3 id="Element.remove" class="dr-method">Element.remove()<a href="#Element.remove" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1717 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1717">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.remove-extra"></div><div class="dr-method"><p>Removes element from the DOM
|
<section><div class="extra" id="Element.remove-extra"></div><div class="dr-method"><p>Removes element from the DOM
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the detached element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the detached element</span></p>
|
||||||
</div></section></article><article id="Element.removeData" class="Element-removeData-section"><header><h3 id="Element.removeData" class="dr-method">Element.removeData([key])<a href="#Element.removeData" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2230 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2230">➭</a></h3></header>
|
</div></section></article><article id="Element.removeData" class="Element-removeData-section"><header><h3 id="Element.removeData" class="dr-method">Element.removeData([key])<a href="#Element.removeData" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2218 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2218">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.removeData-extra"></div><div class="dr-method"><p>Removes value associated with an element by given key.
|
<section><div class="extra" id="Element.removeData-extra"></div><div class="dr-method"><p>Removes value associated with an element by given key.
|
||||||
If key is not provided, removes all the data of the element.
|
If key is not provided, removes all the data of the element.
|
||||||
</p>
|
</p>
|
||||||
|
@ -473,7 +473,7 @@ If key is not provided, removes all the data of the element.
|
||||||
<span class="dr-description">key</span></li>
|
<span class="dr-description">key</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
||||||
</div></section></article><article id="Element.select" class="Element-select-section"><header><h3 id="Element.select" class="dr-method">Element.select(query)<a href="#Element.select" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1744 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1744">➭</a></h3></header>
|
</div></section></article><article id="Element.select" class="Element-select-section"><header><h3 id="Element.select" class="dr-method">Element.select(query)<a href="#Element.select" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1732 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1732">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.select-extra"></div><div class="dr-method"><p>Gathers the nested <a href="#Element" class="dr-link">Element</a> matching the given set of CSS selectors
|
<section><div class="extra" id="Element.select-extra"></div><div class="dr-method"><p>Gathers the nested <a href="#Element" class="dr-link">Element</a> matching the given set of CSS selectors
|
||||||
</p>
|
</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">query</span>
|
<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">query</span>
|
||||||
|
@ -481,7 +481,7 @@ If key is not provided, removes all the data of the element.
|
||||||
<span class="dr-description">CSS selector</span></li>
|
<span class="dr-description">CSS selector</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">result of query selection</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">result of query selection</span></p>
|
||||||
</div></section></article><article id="Element.selectAll" class="Element-selectAll-section"><header><h3 id="Element.selectAll" class="dr-method">Element.selectAll(query)<a href="#Element.selectAll" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1756 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1756">➭</a></h3></header>
|
</div></section></article><article id="Element.selectAll" class="Element-selectAll-section"><header><h3 id="Element.selectAll" class="dr-method">Element.selectAll(query)<a href="#Element.selectAll" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1744 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1744">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.selectAll-extra"></div><div class="dr-method"><p>Gathers nested <a href="#Element" class="dr-link">Element</a> objects matching the given set of CSS selectors
|
<section><div class="extra" id="Element.selectAll-extra"></div><div class="dr-method"><p>Gathers nested <a href="#Element" class="dr-link">Element</a> objects matching the given set of CSS selectors
|
||||||
</p>
|
</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">query</span>
|
<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">query</span>
|
||||||
|
@ -489,15 +489,15 @@ If key is not provided, removes all the data of the element.
|
||||||
<span class="dr-description">CSS selector</span></li>
|
<span class="dr-description">CSS selector</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Set">Set</em> <em class="dr-type-array">array</em> <span class="dr-description">result of query selection</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Set">Set</em> <em class="dr-type-array">array</em> <span class="dr-description">result of query selection</span></p>
|
||||||
</div></section></article><article id="Element.stop" class="Element-stop-section"><header><h3 id="Element.stop" class="dr-method">Element.stop()<a href="#Element.stop" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2112 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2112">➭</a></h3></header>
|
</div></section></article><article id="Element.stop" class="Element-stop-section"><header><h3 id="Element.stop" class="dr-method">Element.stop()<a href="#Element.stop" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2100 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2100">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.stop-extra"></div><div class="dr-method"><p>Stops all the animations for the current element
|
<section><div class="extra" id="Element.stop-extra"></div><div class="dr-method"><p>Stops all the animations for the current element
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the current element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the current element</span></p>
|
||||||
</div></section></article><article id="Element.toDefs" class="Element-toDefs-section"><header><h3 id="Element.toDefs" class="dr-method">Element.toDefs()<a href="#Element.toDefs" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1898 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1898">➭</a></h3></header>
|
</div></section></article><article id="Element.toDefs" class="Element-toDefs-section"><header><h3 id="Element.toDefs" class="dr-method">Element.toDefs()<a href="#Element.toDefs" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1886 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1886">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.toDefs-extra"></div><div class="dr-method"><p>Moves element to the shared <code><defs></code> area
|
<section><div class="extra" id="Element.toDefs-extra"></div><div class="dr-method"><p>Moves element to the shared <code><defs></code> area
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the clone</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the clone</span></p>
|
||||||
</div></section></article><article id="Element.toString" class="Element-toString-section"><header><h3 id="Element.toString" class="dr-method">Element.toString()<a href="#Element.toString" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2934 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2934">➭</a></h3></header>
|
</div></section></article><article id="Element.toString" class="Element-toString-section"><header><h3 id="Element.toString" class="dr-method">Element.toString()<a href="#Element.toString" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2922 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2922">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.toString-extra"></div><div class="dr-method"><p>Returns SVG code for the element, equivalent to HTML's <code>outerHTML</code>
|
<section><div class="extra" id="Element.toString-extra"></div><div class="dr-method"><p>Returns SVG code for the element, equivalent to HTML's <code>outerHTML</code>
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">SVG code for the element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">SVG code for the element</span></p>
|
||||||
|
@ -536,7 +536,7 @@ If key is not provided, removes all the data of the element.
|
||||||
<span class="dr-description">handler for the event</span></li>
|
<span class="dr-description">handler for the event</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
||||||
</div></section></article><article id="Element.transform" class="Element-transform-section"><header><h3 id="Element.transform" class="dr-method">Element.transform(tstr)<a href="#Element.transform" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1570 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1570">➭</a></h3></header>
|
</div></section></article><article id="Element.transform" class="Element-transform-section"><header><h3 id="Element.transform" class="dr-method">Element.transform(tstr)<a href="#Element.transform" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1558 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1558">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.transform-extra"></div><div class="dr-method"><p>Gets or sets transformation of the element
|
<section><div class="extra" id="Element.transform-extra"></div><div class="dr-method"><p>Gets or sets transformation of the element
|
||||||
</p>
|
</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">tstr</span>
|
<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">tstr</span>
|
||||||
|
@ -657,19 +657,19 @@ If key is not provided, removes all the data of the element.
|
||||||
<span class="dr-description">handler for the event</span></li>
|
<span class="dr-description">handler for the event</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
||||||
</div></section></article><article id="Element.use" class="Element-use-section"><header><h3 id="Element.use" class="dr-method">Element.use()<a href="#Element.use" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1789 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1789">➭</a></h3></header>
|
</div></section></article><article id="Element.use" class="Element-use-section"><header><h3 id="Element.use" class="dr-method">Element.use()<a href="#Element.use" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1777 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1777">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Element.use-extra"></div><div class="dr-method"><p>Creates a <code><use></code> element linked to the current element
|
<section><div class="extra" id="Element.use-extra"></div><div class="dr-method"><p>Creates a <code><use></code> element linked to the current element
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the <code><use></code> element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the <code><use></code> element</span></p>
|
||||||
</div></section></article><article id="Fragment" class="Fragment-section"><header><h2 id="Fragment" class="undefined">Fragment<a href="#Fragment" title="Link to this section" class="dr-hash">⚓</a></h2></header>
|
</div></section></article><article id="Fragment" class="Fragment-section"><header><h2 id="Fragment" class="undefined">Fragment<a href="#Fragment" title="Link to this section" class="dr-hash">⚓</a></h2></header>
|
||||||
<section><div class="extra" id="Fragment-extra"></div></section></article><article id="Fragment.select" class="Fragment-select-section"><header><h3 id="Fragment.select" class="dr-method">Fragment.select()<a href="#Fragment.select" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2324 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2324">➭</a></h3></header>
|
<section><div class="extra" id="Fragment-extra"></div></section></article><article id="Fragment.select" class="Fragment-select-section"><header><h3 id="Fragment.select" class="dr-method">Fragment.select()<a href="#Fragment.select" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2312 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2312">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Fragment.select-extra"></div><div class="dr-method"><p>See <a href="#Element.select" class="dr-link">Element.select</a>
|
<section><div class="extra" id="Fragment.select-extra"></div><div class="dr-method"><p>See <a href="#Element.select" class="dr-link">Element.select</a>
|
||||||
</p>
|
</p>
|
||||||
</div></section></article><article id="Fragment.selectAll" class="Fragment-selectAll-section"><header><h3 id="Fragment.selectAll" class="dr-method">Fragment.selectAll()<a href="#Fragment.selectAll" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2331 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2331">➭</a></h3></header>
|
</div></section></article><article id="Fragment.selectAll" class="Fragment-selectAll-section"><header><h3 id="Fragment.selectAll" class="dr-method">Fragment.selectAll()<a href="#Fragment.selectAll" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2319 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2319">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Fragment.selectAll-extra"></div><div class="dr-method"><p>See <a href="#Element.selectAll" class="dr-link">Element.selectAll</a>
|
<section><div class="extra" id="Fragment.selectAll-extra"></div><div class="dr-method"><p>See <a href="#Element.selectAll" class="dr-link">Element.selectAll</a>
|
||||||
</p>
|
</p>
|
||||||
</div></section></article><article id="Matrix" class="Matrix-section"><header><h2 id="Matrix" class="undefined">Matrix<a href="#Matrix" title="Link to this section" class="dr-hash">⚓</a></h2></header>
|
</div></section></article><article id="Matrix" class="Matrix-section"><header><h2 id="Matrix" class="undefined">Matrix<a href="#Matrix" title="Link to this section" class="dr-hash">⚓</a></h2></header>
|
||||||
<section><div class="extra" id="Matrix-extra"></div></section></article><article id="Matrix.add" class="Matrix-add-section"><header><h3 id="Matrix.add" class="dr-method">Matrix.add(…)<a href="#Matrix.add" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 390 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L390">➭</a></h3></header>
|
<section><div class="extra" id="Matrix-extra"></div></section></article><article id="Matrix.add" class="Matrix-add-section"><header><h3 id="Matrix.add" class="dr-method">Matrix.add(…)<a href="#Matrix.add" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 389 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L389">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Matrix.add-extra"></div><div class="dr-method"><p>Adds the given matrix to existing one
|
<section><div class="extra" id="Matrix.add-extra"></div><div class="dr-method"><p>Adds the given matrix to existing one
|
||||||
</p>
|
</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">a</span>
|
<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">a</span>
|
||||||
|
@ -697,15 +697,15 @@ If key is not provided, removes all the data of the element.
|
||||||
<span class="dr-type"><em class="dr-type-object">object</em></span>
|
<span class="dr-type"><em class="dr-type-object">object</em></span>
|
||||||
<span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></li>
|
<span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
</div></section></article><article id="Matrix.clone" class="Matrix-clone-section"><header><h3 id="Matrix.clone" class="dr-method">Matrix.clone()<a href="#Matrix.clone" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 436 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L436">➭</a></h3></header>
|
</div></section></article><article id="Matrix.clone" class="Matrix-clone-section"><header><h3 id="Matrix.clone" class="dr-method">Matrix.clone()<a href="#Matrix.clone" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 435 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L435">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Matrix.clone-extra"></div><div class="dr-method"><p>Returns a copy of the matrix
|
<section><div class="extra" id="Matrix.clone-extra"></div><div class="dr-method"><p>Returns a copy of the matrix
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></p>
|
||||||
</div></section></article><article id="Matrix.invert" class="Matrix-invert-section"><header><h3 id="Matrix.invert" class="dr-method">Matrix.invert()<a href="#Matrix.invert" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 424 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L424">➭</a></h3></header>
|
</div></section></article><article id="Matrix.invert" class="Matrix-invert-section"><header><h3 id="Matrix.invert" class="dr-method">Matrix.invert()<a href="#Matrix.invert" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 423 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L423">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Matrix.invert-extra"></div><div class="dr-method"><p>Returns an inverted version of the matrix
|
<section><div class="extra" id="Matrix.invert-extra"></div><div class="dr-method"><p>Returns an inverted version of the matrix
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></p>
|
||||||
</div></section></article><article id="Matrix.rotate" class="Matrix-rotate-section"><header><h3 id="Matrix.rotate" class="dr-method">Matrix.rotate(a, x, y)<a href="#Matrix.rotate" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 477 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L477">➭</a></h3></header>
|
</div></section></article><article id="Matrix.rotate" class="Matrix-rotate-section"><header><h3 id="Matrix.rotate" class="dr-method">Matrix.rotate(a, x, y)<a href="#Matrix.rotate" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 476 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L476">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Matrix.rotate-extra"></div><div class="dr-method"><p>Rotates the matrix
|
<section><div class="extra" id="Matrix.rotate-extra"></div><div class="dr-method"><p>Rotates the matrix
|
||||||
</p>
|
</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">a</span>
|
<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">a</span>
|
||||||
|
@ -718,7 +718,7 @@ If key is not provided, removes all the data of the element.
|
||||||
<span class="dr-type"><em class="dr-type-number">number</em></span>
|
<span class="dr-type"><em class="dr-type-number">number</em></span>
|
||||||
<span class="dr-description">vertical origin point from which to rotate</span></li>
|
<span class="dr-description">vertical origin point from which to rotate</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
</div></section></article><article id="Matrix.scale" class="Matrix-scale-section"><header><h3 id="Matrix.scale" class="dr-method">Matrix.scale(x, [y], [cx], [cy])<a href="#Matrix.scale" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 461 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L461">➭</a></h3></header>
|
</div></section></article><article id="Matrix.scale" class="Matrix-scale-section"><header><h3 id="Matrix.scale" class="dr-method">Matrix.scale(x, [y], [cx], [cy])<a href="#Matrix.scale" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 460 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L460">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Matrix.scale-extra"></div><div class="dr-method"><p>Scales the matrix
|
<section><div class="extra" id="Matrix.scale-extra"></div><div class="dr-method"><p>Scales the matrix
|
||||||
</p>
|
</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">x</span>
|
<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">x</span>
|
||||||
|
@ -739,7 +739,7 @@ If key is not provided, removes all the data of the element.
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p>Default cx, cy is the middle point of the element.
|
<p>Default cx, cy is the middle point of the element.
|
||||||
</p>
|
</p>
|
||||||
</div></section></article><article id="Matrix.split" class="Matrix-split-section"><header><h3 id="Matrix.split" class="dr-method">Matrix.split()<a href="#Matrix.split" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 544 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L544">➭</a></h3></header>
|
</div></section></article><article id="Matrix.split" class="Matrix-split-section"><header><h3 id="Matrix.split" class="dr-method">Matrix.split()<a href="#Matrix.split" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 543 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L543">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Matrix.split-extra"></div><div class="dr-method"><p>Splits matrix into primitive transformations
|
<section><div class="extra" id="Matrix.split-extra"></div><div class="dr-method"><p>Splits matrix into primitive transformations
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">in format:</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">in format:</span></p>
|
||||||
|
@ -751,11 +751,11 @@ If key is not provided, removes all the data of the element.
|
||||||
<li><span class="dr-json-key">rotate</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">rotation in deg</span>
|
<li><span class="dr-json-key">rotate</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">rotation in deg</span>
|
||||||
<li><span class="dr-json-key">isSimple</span><span class="dr-type"><em class="dr-type-boolean">boolean</em></span><span class="dr-json-description">could it be represented via simple transformations</span>
|
<li><span class="dr-json-key">isSimple</span><span class="dr-type"><em class="dr-type-boolean">boolean</em></span><span class="dr-json-description">could it be represented via simple transformations</span>
|
||||||
</ol>
|
</ol>
|
||||||
</div></section></article><article id="Matrix.toTransformString" class="Matrix-toTransformString-section"><header><h3 id="Matrix.toTransformString" class="dr-method">Matrix.toTransformString()<a href="#Matrix.toTransformString" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 587 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L587">➭</a></h3></header>
|
</div></section></article><article id="Matrix.toTransformString" class="Matrix-toTransformString-section"><header><h3 id="Matrix.toTransformString" class="dr-method">Matrix.toTransformString()<a href="#Matrix.toTransformString" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 586 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L586">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Matrix.toTransformString-extra"></div><div class="dr-method"><p>Returns transform string that represents given matrix
|
<section><div class="extra" id="Matrix.toTransformString-extra"></div><div class="dr-method"><p>Returns transform string that represents given matrix
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">transform string</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">transform string</span></p>
|
||||||
</div></section></article><article id="Matrix.translate" class="Matrix-translate-section"><header><h3 id="Matrix.translate" class="dr-method">Matrix.translate(x, y)<a href="#Matrix.translate" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 447 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L447">➭</a></h3></header>
|
</div></section></article><article id="Matrix.translate" class="Matrix-translate-section"><header><h3 id="Matrix.translate" class="dr-method">Matrix.translate(x, y)<a href="#Matrix.translate" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 446 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L446">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Matrix.translate-extra"></div><div class="dr-method"><p>Translate the matrix
|
<section><div class="extra" id="Matrix.translate-extra"></div><div class="dr-method"><p>Translate the matrix
|
||||||
</p>
|
</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">x</span>
|
<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">x</span>
|
||||||
|
@ -765,7 +765,7 @@ If key is not provided, removes all the data of the element.
|
||||||
<span class="dr-type"><em class="dr-type-number">number</em></span>
|
<span class="dr-type"><em class="dr-type-number">number</em></span>
|
||||||
<span class="dr-description">vertical offset distance</span></li>
|
<span class="dr-description">vertical offset distance</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
</div></section></article><article id="Matrix.x" class="Matrix-x-section"><header><h3 id="Matrix.x" class="dr-method">Matrix.x(x, y)<a href="#Matrix.x" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 495 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L495">➭</a></h3></header>
|
</div></section></article><article id="Matrix.x" class="Matrix-x-section"><header><h3 id="Matrix.x" class="dr-method">Matrix.x(x, y)<a href="#Matrix.x" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 494 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L494">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Matrix.x-extra"></div><div class="dr-method"><p>Returns x coordinate for given point after transformation described by the matrix. See also <a href="#Matrix.y" class="dr-link">Matrix.y</a>
|
<section><div class="extra" id="Matrix.x-extra"></div><div class="dr-method"><p>Returns x coordinate for given point after transformation described by the matrix. See also <a href="#Matrix.y" class="dr-link">Matrix.y</a>
|
||||||
</p>
|
</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">x</span>
|
<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">x</span>
|
||||||
|
@ -776,7 +776,7 @@ If key is not provided, removes all the data of the element.
|
||||||
<span class="dr-description"> </span></li>
|
<span class="dr-description"> </span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">x</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">x</span></p>
|
||||||
</div></section></article><article id="Matrix.y" class="Matrix-y-section"><header><h3 id="Matrix.y" class="dr-method">Matrix.y(x, y)<a href="#Matrix.y" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 507 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L507">➭</a></h3></header>
|
</div></section></article><article id="Matrix.y" class="Matrix-y-section"><header><h3 id="Matrix.y" class="dr-method">Matrix.y(x, y)<a href="#Matrix.y" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 506 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L506">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Matrix.y-extra"></div><div class="dr-method"><p>Returns y coordinate for given point after transformation described by the matrix. See also <a href="#Matrix.x" class="dr-link">Matrix.x</a>
|
<section><div class="extra" id="Matrix.y-extra"></div><div class="dr-method"><p>Returns y coordinate for given point after transformation described by the matrix. See also <a href="#Matrix.x" class="dr-link">Matrix.x</a>
|
||||||
</p>
|
</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">x</span>
|
<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">x</span>
|
||||||
|
@ -788,7 +788,7 @@ If key is not provided, removes all the data of the element.
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">y</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">y</span></p>
|
||||||
</div></section></article><article id="Paper" class="Paper-section"><header><h2 id="Paper" class="undefined">Paper<a href="#Paper" title="Link to this section" class="dr-hash">⚓</a></h2></header>
|
</div></section></article><article id="Paper" class="Paper-section"><header><h2 id="Paper" class="undefined">Paper<a href="#Paper" title="Link to this section" class="dr-hash">⚓</a></h2></header>
|
||||||
<section><div class="extra" id="Paper-extra"></div></section></article><article id="Paper.circle" class="Paper-circle-section"><header><h3 id="Paper.circle" class="dr-method">Paper.circle(x, y, r)<a href="#Paper.circle" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2603 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2603">➭</a></h3></header>
|
<section><div class="extra" id="Paper-extra"></div></section></article><article id="Paper.circle" class="Paper-circle-section"><header><h3 id="Paper.circle" class="dr-method">Paper.circle(x, y, r)<a href="#Paper.circle" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2591 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2591">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Paper.circle-extra"></div><div class="dr-method"><p>Draws a circle
|
<section><div class="extra" id="Paper.circle-extra"></div><div class="dr-method"><p>Draws a circle
|
||||||
</p>
|
</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">x</span>
|
<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">x</span>
|
||||||
|
@ -804,10 +804,10 @@ If key is not provided, removes all the data of the element.
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">the <code>circle</code> element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">the <code>circle</code> element</span></p>
|
||||||
<h3>Usage</h3><section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var c = paper.circle(50, 50, 40);
|
<h3>Usage</h3><section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var c = paper.circle(50, 50, 40);
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
</div></section></article><article id="Paper.clear" class="Paper-clear-section"><header><h3 id="Paper.clear" class="dr-method">Paper.clear()<a href="#Paper.clear" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2952 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2952">➭</a></h3></header>
|
</div></section></article><article id="Paper.clear" class="Paper-clear-section"><header><h3 id="Paper.clear" class="dr-method">Paper.clear()<a href="#Paper.clear" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2940 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2940">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Paper.clear-extra"></div><div class="dr-method"><p>Removes all child nodes of the paper, except <defs>.
|
<section><div class="extra" id="Paper.clear-extra"></div><div class="dr-method"><p>Removes all child nodes of the paper, except <defs>.
|
||||||
</p>
|
</p>
|
||||||
</div></section></article><article id="Paper.el" class="Paper-el-section"><header><h3 id="Paper.el" class="dr-method">Paper.el(name, attr)<a href="#Paper.el" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2543 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2543">➭</a></h3></header>
|
</div></section></article><article id="Paper.el" class="Paper-el-section"><header><h3 id="Paper.el" class="dr-method">Paper.el(name, attr)<a href="#Paper.el" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2531 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2531">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Paper.el-extra"></div><div class="dr-method"><p>Creates an element on paper with a given name and no attributes
|
<section><div class="extra" id="Paper.el-extra"></div><div class="dr-method"><p>Creates an element on paper with a given name and no attributes
|
||||||
</p>
|
</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">name</span>
|
<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">name</span>
|
||||||
|
@ -825,7 +825,7 @@ var c = paper.el("circle").attr({
|
||||||
r: 10
|
r: 10
|
||||||
});
|
});
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
</div></section></article><article id="Paper.ellipse" class="Paper-ellipse-section"><header><h3 id="Paper.ellipse" class="dr-method">Paper.ellipse(x, y, rx, ry)<a href="#Paper.ellipse" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2678 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2678">➭</a></h3></header>
|
</div></section></article><article id="Paper.ellipse" class="Paper-ellipse-section"><header><h3 id="Paper.ellipse" class="dr-method">Paper.ellipse(x, y, rx, ry)<a href="#Paper.ellipse" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2666 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2666">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Paper.ellipse-extra"></div><div class="dr-method"><p>Draws an ellipse
|
<section><div class="extra" id="Paper.ellipse-extra"></div><div class="dr-method"><p>Draws an ellipse
|
||||||
</p>
|
</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">x</span>
|
<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">x</span>
|
||||||
|
@ -859,7 +859,7 @@ var c = paper.el("circle").attr({
|
||||||
filter: f
|
filter: f
|
||||||
});
|
});
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
</div></section></article><article id="Paper.g" class="Paper-g-section"><header><h3 id="Paper.g" class="dr-method">Paper.g([varargs])<a href="#Paper.g" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2754 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2754">➭</a></h3></header>
|
</div></section></article><article id="Paper.g" class="Paper-g-section"><header><h3 id="Paper.g" class="dr-method">Paper.g([varargs])<a href="#Paper.g" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2742 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2742">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Paper.g-extra"></div><div class="dr-method"><p>Creates a group element
|
<section><div class="extra" id="Paper.g-extra"></div><div class="dr-method"><p>Creates a group element
|
||||||
</p>
|
</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 optional">varargs</span>
|
<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 optional">varargs</span>
|
||||||
|
@ -879,7 +879,7 @@ var c = paper.el("circle").attr({
|
||||||
g = paper.g();
|
g = paper.g();
|
||||||
g.add(c2, c1);
|
g.add(c2, c1);
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
</div></section></article><article id="Paper.gradient" class="Paper-gradient-section"><header><h3 id="Paper.gradient" class="dr-method">Paper.gradient(gradient)<a href="#Paper.gradient" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2918 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2918">➭</a></h3></header>
|
</div></section></article><article id="Paper.gradient" class="Paper-gradient-section"><header><h3 id="Paper.gradient" class="dr-method">Paper.gradient(gradient)<a href="#Paper.gradient" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2906 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2906">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Paper.gradient-extra"></div><div class="dr-method"><p>Creates a gradient element
|
<section><div class="extra" id="Paper.gradient-extra"></div><div class="dr-method"><p>Creates a gradient element
|
||||||
</p>
|
</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">gradient</span>
|
<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">gradient</span>
|
||||||
|
@ -922,10 +922,10 @@ half the width, from black to white:
|
||||||
});
|
});
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">the <code>gradient</code> element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">the <code>gradient</code> element</span></p>
|
||||||
</div></section></article><article id="Paper.group" class="Paper-group-section"><header><h3 id="Paper.group" class="dr-method">Paper.group()<a href="#Paper.group" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2760 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2760">➭</a></h3></header>
|
</div></section></article><article id="Paper.group" class="Paper-group-section"><header><h3 id="Paper.group" class="dr-method">Paper.group()<a href="#Paper.group" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2748 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2748">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Paper.group-extra"></div><div class="dr-method"><p>See <a href="#Paper.g" class="dr-link">Paper.g</a>
|
<section><div class="extra" id="Paper.group-extra"></div><div class="dr-method"><p>See <a href="#Paper.g" class="dr-link">Paper.g</a>
|
||||||
</p>
|
</p>
|
||||||
</div></section></article><article id="Paper.image" class="Paper-image-section"><header><h3 id="Paper.image" class="dr-method">Paper.image(src, x, y, width, height)<a href="#Paper.image" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2635 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2635">➭</a></h3></header>
|
</div></section></article><article id="Paper.image" class="Paper-image-section"><header><h3 id="Paper.image" class="dr-method">Paper.image(src, x, y, width, height)<a href="#Paper.image" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2623 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2623">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Paper.image-extra"></div><div class="dr-method"><p>Places an image on the surface
|
<section><div class="extra" id="Paper.image-extra"></div><div class="dr-method"><p>Places an image on the surface
|
||||||
</p>
|
</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">src</span>
|
<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">src</span>
|
||||||
|
@ -950,7 +950,7 @@ half the width, from black to white:
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Raphaël element object with type <code>image</code></span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Raphaël element object with type <code>image</code></span></p>
|
||||||
<h3>Usage</h3><section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var c = paper.image("apple.png", 10, 10, 80, 80);
|
<h3>Usage</h3><section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var c = paper.image("apple.png", 10, 10, 80, 80);
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
</div></section></article><article id="Paper.line" class="Paper-line-section"><header><h3 id="Paper.line" class="dr-method">Paper.line(x1, y1, x2, y2)<a href="#Paper.line" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2816 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2816">➭</a></h3></header>
|
</div></section></article><article id="Paper.line" class="Paper-line-section"><header><h3 id="Paper.line" class="dr-method">Paper.line(x1, y1, x2, y2)<a href="#Paper.line" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2804 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2804">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Paper.line-extra"></div><div class="dr-method"><p>Draws a line
|
<section><div class="extra" id="Paper.line-extra"></div><div class="dr-method"><p>Draws a line
|
||||||
</p>
|
</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">x1</span>
|
<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">x1</span>
|
||||||
|
@ -969,7 +969,7 @@ half the width, from black to white:
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">the <code>line</code> element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">the <code>line</code> element</span></p>
|
||||||
<h3>Usage</h3><section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var t1 = paper.line(50, 50, 100, 100);
|
<h3>Usage</h3><section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var t1 = paper.line(50, 50, 100, 100);
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
</div></section></article><article id="Paper.path" class="Paper-path-section"><header><h3 id="Paper.path" class="dr-method">Paper.path([pathString])<a href="#Paper.path" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2723 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2723">➭</a></h3></header>
|
</div></section></article><article id="Paper.path" class="Paper-path-section"><header><h3 id="Paper.path" class="dr-method">Paper.path([pathString])<a href="#Paper.path" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2711 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2711">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Paper.path-extra"></div><div class="dr-method"><p>Creates a <code><path></code> element using the given string as the path's definition
|
<section><div class="extra" id="Paper.path-extra"></div><div class="dr-method"><p>Creates a <code><path></code> element using the given string as the path's definition
|
||||||
</p>
|
</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 optional">pathString</span>
|
<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 optional">pathString</span>
|
||||||
|
@ -1004,10 +1004,10 @@ Note: there is a special case when a path consists of only three commands: <code
|
||||||
// draw a diagonal line:
|
// draw a diagonal line:
|
||||||
// move to 10,10, line to 90,90
|
// move to 10,10, line to 90,90
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
</div></section></article><article id="Paper.polygon" class="Paper-polygon-section"><header><h3 id="Paper.polygon" class="dr-method">Paper.polygon()<a href="#Paper.polygon" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2865 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2865">➭</a></h3></header>
|
</div></section></article><article id="Paper.polygon" class="Paper-polygon-section"><header><h3 id="Paper.polygon" class="dr-method">Paper.polygon()<a href="#Paper.polygon" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2853 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2853">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Paper.polygon-extra"></div><div class="dr-method"><p>Draws a polygon. See <a href="#Paper.polyline" class="dr-link">Paper.polyline</a>
|
<section><div class="extra" id="Paper.polygon-extra"></div><div class="dr-method"><p>Draws a polygon. See <a href="#Paper.polyline" class="dr-link">Paper.polyline</a>
|
||||||
</p>
|
</p>
|
||||||
</div></section></article><article id="Paper.polyline" class="Paper-polyline-section"><header><h3 id="Paper.polyline" class="dr-method">Paper.polyline(…)<a href="#Paper.polyline" title="Link to this section" class="dr-hash">⚓</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#L2845">➭</a></h3></header>
|
</div></section></article><article id="Paper.polyline" class="Paper-polyline-section"><header><h3 id="Paper.polyline" class="dr-method">Paper.polyline(…)<a href="#Paper.polyline" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2833 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2833">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Paper.polyline-extra"></div><div class="dr-method"><p>Draws a polyline
|
<section><div class="extra" id="Paper.polyline-extra"></div><div class="dr-method"><p>Draws a polyline
|
||||||
</p>
|
</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">points</span>
|
<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">points</span>
|
||||||
|
@ -1024,7 +1024,7 @@ Note: there is a special case when a path consists of only three commands: <code
|
||||||
<h3>Usage</h3><section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var p1 = paper.polyline([10, 10, 100, 100]);
|
<h3>Usage</h3><section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var p1 = paper.polyline([10, 10, 100, 100]);
|
||||||
var p2 = paper.polyline(10, 10, 100, 100);
|
var p2 = paper.polyline(10, 10, 100, 100);
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
</div></section></article><article id="Paper.rect" class="Paper-rect-section"><header><h3 id="Paper.rect" class="dr-method">Paper.rect(x, y, width, height, [rx], [ry])<a href="#Paper.rect" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2566 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2566">➭</a></h3></header>
|
</div></section></article><article id="Paper.rect" class="Paper-rect-section"><header><h3 id="Paper.rect" class="dr-method">Paper.rect(x, y, width, height, [rx], [ry])<a href="#Paper.rect" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2554 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2554">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Paper.rect-extra"></div><div class="dr-method"><p></p>
|
<section><div class="extra" id="Paper.rect-extra"></div><div class="dr-method"><p></p>
|
||||||
<p>Draws a rectangle
|
<p>Draws a rectangle
|
||||||
</p>
|
</p>
|
||||||
|
@ -1055,7 +1055,7 @@ var c = paper.rect(10, 10, 50, 50);
|
||||||
// rectangle with rounded corners
|
// rectangle with rounded corners
|
||||||
var c = paper.rect(40, 40, 50, 50, 10);
|
var c = paper.rect(40, 40, 50, 50, 10);
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
</div></section></article><article id="Paper.text" class="Paper-text-section"><header><h3 id="Paper.text" class="dr-method">Paper.text(x, y, text)<a href="#Paper.text" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2788 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2788">➭</a></h3></header>
|
</div></section></article><article id="Paper.text" class="Paper-text-section"><header><h3 id="Paper.text" class="dr-method">Paper.text(x, y, text)<a href="#Paper.text" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2776 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2776">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Paper.text-extra"></div><div class="dr-method"><p>Draws a text string
|
<section><div class="extra" id="Paper.text-extra"></div><div class="dr-method"><p>Draws a text string
|
||||||
</p>
|
</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">x</span>
|
<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">x</span>
|
||||||
|
@ -1072,7 +1072,7 @@ var c = paper.rect(40, 40, 50, 50, 10);
|
||||||
<h3>Usage</h3><section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var t1 = paper.text(50, 50, "Snap");
|
<h3>Usage</h3><section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var t1 = paper.text(50, 50, "Snap");
|
||||||
var t2 = paper.text(50, 50, ["S","n","a","p"]);
|
var t2 = paper.text(50, 50, ["S","n","a","p"]);
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
</div></section></article><article id="Paper.toString" class="Paper-toString-section"><header><h3 id="Paper.toString" class="dr-method">Paper.toString()<a href="#Paper.toString" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2934 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2934">➭</a></h3></header>
|
</div></section></article><article id="Paper.toString" class="Paper-toString-section"><header><h3 id="Paper.toString" class="dr-method">Paper.toString()<a href="#Paper.toString" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2922 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2922">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Paper.toString-extra"></div><div class="dr-method"><p>Returns SVG code for the element, equivalent to HTML's <code>outerHTML</code>
|
<section><div class="extra" id="Paper.toString-extra"></div><div class="dr-method"><p>Returns SVG code for the element, equivalent to HTML's <code>outerHTML</code>
|
||||||
</p>
|
</p>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">SVG code for the element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">SVG code for the element</span></p>
|
||||||
|
@ -1150,7 +1150,7 @@ var t2 = paper.text(50, 50, ["S","n","a","p"]);
|
||||||
<span class="dr-description">CSS query selector</span></li>
|
<span class="dr-description">CSS query selector</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
|
||||||
</div></section></article><article id="Snap.Matrix" class="Snap-Matrix-section"><header><h3 id="Snap.Matrix" class="dr-method">Snap.Matrix(…)<a href="#Snap.Matrix" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 619 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L619">➭</a></h3></header>
|
</div></section></article><article id="Snap.Matrix" class="Snap-Matrix-section"><header><h3 id="Snap.Matrix" class="dr-method">Snap.Matrix(…)<a href="#Snap.Matrix" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 618 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L618">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.Matrix-extra"></div><div class="dr-method"><p>Utility method
|
<section><div class="extra" id="Snap.Matrix-extra"></div><div class="dr-method"><p>Utility method
|
||||||
Returns a matrix based on the given parameters
|
Returns a matrix based on the given parameters
|
||||||
</p>
|
</p>
|
||||||
|
@ -1180,7 +1180,7 @@ Returns a matrix based on the given parameters
|
||||||
<span class="dr-description"> </span></li>
|
<span class="dr-description"> </span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></p>
|
||||||
</div></section></article><article id="Snap.ajax" class="Snap-ajax-section"><header><h3 id="Snap.ajax" class="dr-method">Snap.ajax(…)<a href="#Snap.ajax" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2983 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2983">➭</a></h3></header>
|
</div></section></article><article id="Snap.ajax" class="Snap-ajax-section"><header><h3 id="Snap.ajax" class="dr-method">Snap.ajax(…)<a href="#Snap.ajax" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2971 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2971">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.ajax-extra"></div><div class="dr-method"><p>Simple implementation of Ajax
|
<section><div class="extra" id="Snap.ajax-extra"></div><div class="dr-method"><p>Simple implementation of Ajax
|
||||||
</p>
|
</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">url</span>
|
<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">url</span>
|
||||||
|
@ -1211,7 +1211,7 @@ Returns a matrix based on the given parameters
|
||||||
<span class="dr-description">scope of callback</span></li>
|
<span class="dr-description">scope of callback</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-XMLHttpRequest">XMLHttpRequest</em> <span class="dr-description">the XMLHttpRequest object, just in case</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-XMLHttpRequest">XMLHttpRequest</em> <span class="dr-description">the XMLHttpRequest object, just in case</span></p>
|
||||||
</div></section></article><article id="Snap.angle" class="Snap-angle-section"><header><h3 id="Snap.angle" class="dr-method">Snap.angle(x1, y1, x2, y2, [x3], [y3])<a href="#Snap.angle" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 307 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L307">➭</a></h3></header>
|
</div></section></article><article id="Snap.angle" class="Snap-angle-section"><header><h3 id="Snap.angle" class="dr-method">Snap.angle(x1, y1, x2, y2, [x3], [y3])<a href="#Snap.angle" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 306 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L306">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.angle-extra"></div><div class="dr-method"><p>Returns an angle between two or three points
|
<section><div class="extra" id="Snap.angle-extra"></div><div class="dr-method"><p>Returns an angle between two or three points
|
||||||
</p>
|
</p>
|
||||||
<h3>Parameters</h3><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">x1</span>
|
<h3>Parameters</h3><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">x1</span>
|
||||||
|
@ -1236,7 +1236,7 @@ Returns a matrix based on the given parameters
|
||||||
<span class="dr-description">y coord of third point</span></li>
|
<span class="dr-description">y coord of third point</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">angle in degrees</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">angle in degrees</span></p>
|
||||||
</div></section></article><article id="Snap.animate" class="Snap-animate-section"><header><h3 id="Snap.animate" class="dr-method">Snap.animate(from, to, setter, duration, [easing], [callback])<a href="#Snap.animate" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2094 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2094">➭</a></h3></header>
|
</div></section></article><article id="Snap.animate" class="Snap-animate-section"><header><h3 id="Snap.animate" class="dr-method">Snap.animate(from, to, setter, duration, [easing], [callback])<a href="#Snap.animate" title="Link to this section" class="dr-hash">⚓</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#L2082">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.animate-extra"></div><div class="dr-method"><p>Runs generic animation of one number into another with a caring function
|
<section><div class="extra" id="Snap.animate-extra"></div><div class="dr-method"><p>Runs generic animation of one number into another with a caring function
|
||||||
</p>
|
</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">from</span>
|
<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">from</span>
|
||||||
|
@ -1277,7 +1277,7 @@ Snap.animate(0, 10, function (val) {
|
||||||
// in given context is equivalent to
|
// in given context is equivalent to
|
||||||
rect.animate({x: 10}, 1000);
|
rect.animate({x: 10}, 1000);
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
</div></section></article><article id="Snap.animation" class="Snap-animation-section"><header><h3 id="Snap.animation" class="dr-method">Snap.animation(attr, duration, [easing], [callback])<a href="#Snap.animation" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2028 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2028">➭</a></h3></header>
|
</div></section></article><article id="Snap.animation" class="Snap-animation-section"><header><h3 id="Snap.animation" class="dr-method">Snap.animation(attr, duration, [easing], [callback])<a href="#Snap.animation" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2016 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2016">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.animation-extra"></div><div class="dr-method"><p>Creates an animation object
|
<section><div class="extra" id="Snap.animation-extra"></div><div class="dr-method"><p>Creates an animation object
|
||||||
</p>
|
</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">attr</span>
|
<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">attr</span>
|
||||||
|
@ -1296,7 +1296,7 @@ rect.animate({x: 10}, 1000);
|
||||||
<span class="dr-description">callback function that fires when animation ends</span></li>
|
<span class="dr-description">callback function that fires when animation ends</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">animation object</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">animation object</span></p>
|
||||||
</div></section></article><article id="Snap.color" class="Snap-color-section"><header><h3 id="Snap.color" class="dr-method">Snap.color(clr)<a href="#Snap.color" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 856 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L856">➭</a></h3></header>
|
</div></section></article><article id="Snap.color" class="Snap-color-section"><header><h3 id="Snap.color" class="dr-method">Snap.color(clr)<a href="#Snap.color" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 855 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L855">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.color-extra"></div><div class="dr-method"><p>Parses the color string and returns an object featuring the color's component values
|
<section><div class="extra" id="Snap.color-extra"></div><div class="dr-method"><p>Parses the color string and returns an object featuring the color's component values
|
||||||
</p>
|
</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">clr</span>
|
<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">clr</span>
|
||||||
|
@ -1314,7 +1314,7 @@ rect.animate({x: 10}, 1000);
|
||||||
<li><span class="dr-json-key">v</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">value (brightness),</span>
|
<li><span class="dr-json-key">v</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">value (brightness),</span>
|
||||||
<li><span class="dr-json-key">l</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">lightness</span>
|
<li><span class="dr-json-key">l</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">lightness</span>
|
||||||
</ol></li><li>}</li></ol>
|
</ol></li><li>}</li></ol>
|
||||||
</div></section></article><article id="Snap.deg" class="Snap-deg-section"><header><h3 id="Snap.deg" class="dr-method">Snap.deg(rad)<a href="#Snap.deg" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 291 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L291">➭</a></h3></header>
|
</div></section></article><article id="Snap.deg" class="Snap-deg-section"><header><h3 id="Snap.deg" class="dr-method">Snap.deg(rad)<a href="#Snap.deg" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 290 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L290">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.deg-extra"></div><div class="dr-method"><p>Transform angle to degrees
|
<section><div class="extra" id="Snap.deg-extra"></div><div class="dr-method"><p>Transform angle to degrees
|
||||||
</p>
|
</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">rad</span>
|
<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">rad</span>
|
||||||
|
@ -1420,7 +1420,7 @@ rect.animate({x: 10}, 1000);
|
||||||
filter: f
|
filter: f
|
||||||
});
|
});
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
</div></section></article><article id="Snap.format" class="Snap-format-section"><header><h3 id="Snap.format" class="dr-method">Snap.format(token, json)<a href="#Snap.format" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 174 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L174">➭</a></h3></header>
|
</div></section></article><article id="Snap.format" class="Snap-format-section"><header><h3 id="Snap.format" class="dr-method">Snap.format(token, json)<a href="#Snap.format" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 173 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L173">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.format-extra"></div><div class="dr-method"><p>Replaces construction of type <code>{<name>}</code> to the corresponding argument
|
<section><div class="extra" id="Snap.format-extra"></div><div class="dr-method"><p>Replaces construction of type <code>{<name>}</code> to the corresponding argument
|
||||||
</p>
|
</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">token</span>
|
<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">token</span>
|
||||||
|
@ -1442,7 +1442,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
}
|
}
|
||||||
}));
|
}));
|
||||||
</code></pre></section>
|
</code></pre></section>
|
||||||
</div></section></article><article id="Snap.fragment" class="Snap-fragment-section"><header><h3 id="Snap.fragment" class="dr-method">Snap.fragment(varargs)<a href="#Snap.fragment" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2342 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2342">➭</a></h3></header>
|
</div></section></article><article id="Snap.fragment" class="Snap-fragment-section"><header><h3 id="Snap.fragment" class="dr-method">Snap.fragment(varargs)<a href="#Snap.fragment" title="Link to this section" class="dr-hash">⚓</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#L2330">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.fragment-extra"></div><div class="dr-method"><p>Creates a DOM fragment from a given list of elements or strings
|
<section><div class="extra" id="Snap.fragment-extra"></div><div class="dr-method"><p>Creates a DOM fragment from a given list of elements or strings
|
||||||
</p>
|
</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">varargs</span>
|
<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">varargs</span>
|
||||||
|
@ -1450,7 +1450,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<span class="dr-description">SVG string</span></li>
|
<span class="dr-description">SVG string</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Fragment">Fragment</em> <span class="dr-description">the <a href="#Fragment" class="dr-link">Fragment</a></span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Fragment">Fragment</em> <span class="dr-description">the <a href="#Fragment" class="dr-link">Fragment</a></span></p>
|
||||||
</div></section></article><article id="Snap.getRGB" class="Snap-getRGB-section"><header><h3 id="Snap.getRGB" class="dr-method">Snap.getRGB(color)<a href="#Snap.getRGB" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 654 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L654">➭</a></h3></header>
|
</div></section></article><article id="Snap.getRGB" class="Snap-getRGB-section"><header><h3 id="Snap.getRGB" class="dr-method">Snap.getRGB(color)<a href="#Snap.getRGB" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 653 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L653">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.getRGB-extra"></div><div class="dr-method"><p>Parses color string as RGB object
|
<section><div class="extra" id="Snap.getRGB-extra"></div><div class="dr-method"><p>Parses color string as RGB object
|
||||||
</p>
|
</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">color</span>
|
<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">color</span>
|
||||||
|
@ -1483,7 +1483,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<li><span class="dr-json-key">hex</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">color in HTML/CSS format: #••••••,</span>
|
<li><span class="dr-json-key">hex</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">color in HTML/CSS format: #••••••,</span>
|
||||||
<li><span class="dr-json-key">error</span><span class="dr-type"><em class="dr-type-boolean">boolean</em></span><span class="dr-json-description">true if string can't be parsed</span>
|
<li><span class="dr-json-key">error</span><span class="dr-type"><em class="dr-type-boolean">boolean</em></span><span class="dr-json-description">true if string can't be parsed</span>
|
||||||
</ol></li><li>}</li></ol>
|
</ol></li><li>}</li></ol>
|
||||||
</div></section></article><article id="Snap.hsb" class="Snap-hsb-section"><header><h3 id="Snap.hsb" class="dr-method">Snap.hsb(h, s, b)<a href="#Snap.hsb" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 743 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L743">➭</a></h3></header>
|
</div></section></article><article id="Snap.hsb" class="Snap-hsb-section"><header><h3 id="Snap.hsb" class="dr-method">Snap.hsb(h, s, b)<a href="#Snap.hsb" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 742 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L742">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.hsb-extra"></div><div class="dr-method"><p>Converts HSB values to a hex representation of the color
|
<section><div class="extra" id="Snap.hsb-extra"></div><div class="dr-method"><p>Converts HSB values to a hex representation of the color
|
||||||
</p>
|
</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">h</span>
|
<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">h</span>
|
||||||
|
@ -1497,7 +1497,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<span class="dr-description">value or brightness</span></li>
|
<span class="dr-description">value or brightness</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">hex representation of the color</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">hex representation of the color</span></p>
|
||||||
</div></section></article><article id="Snap.hsb2rgb" class="Snap-hsb2rgb-section"><header><h3 id="Snap.hsb2rgb" class="dr-method">Snap.hsb2rgb(h, s, v)<a href="#Snap.hsb2rgb" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 908 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L908">➭</a></h3></header>
|
</div></section></article><article id="Snap.hsb2rgb" class="Snap-hsb2rgb-section"><header><h3 id="Snap.hsb2rgb" class="dr-method">Snap.hsb2rgb(h, s, v)<a href="#Snap.hsb2rgb" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 907 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L907">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.hsb2rgb-extra"></div><div class="dr-method"><p>Converts HSB values to an RGB object
|
<section><div class="extra" id="Snap.hsb2rgb-extra"></div><div class="dr-method"><p>Converts HSB values to an RGB object
|
||||||
</p>
|
</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">h</span>
|
<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">h</span>
|
||||||
|
@ -1516,7 +1516,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<li><span class="dr-json-key">b</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">blue,</span>
|
<li><span class="dr-json-key">b</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">blue,</span>
|
||||||
<li><span class="dr-json-key">hex</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">color in HTML/CSS format: #••••••</span>
|
<li><span class="dr-json-key">hex</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">color in HTML/CSS format: #••••••</span>
|
||||||
</ol></li><li>}</li></ol>
|
</ol></li><li>}</li></ol>
|
||||||
</div></section></article><article id="Snap.hsl" class="Snap-hsl-section"><header><h3 id="Snap.hsl" class="dr-method">Snap.hsl(h, s, l)<a href="#Snap.hsl" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 756 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L756">➭</a></h3></header>
|
</div></section></article><article id="Snap.hsl" class="Snap-hsl-section"><header><h3 id="Snap.hsl" class="dr-method">Snap.hsl(h, s, l)<a href="#Snap.hsl" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 755 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L755">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.hsl-extra"></div><div class="dr-method"><p>Converts HSL values to a hex representation of the color
|
<section><div class="extra" id="Snap.hsl-extra"></div><div class="dr-method"><p>Converts HSL values to a hex representation of the color
|
||||||
</p>
|
</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">h</span>
|
<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">h</span>
|
||||||
|
@ -1530,7 +1530,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<span class="dr-description">luminosity</span></li>
|
<span class="dr-description">luminosity</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">hex representation of the color</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">hex representation of the color</span></p>
|
||||||
</div></section></article><article id="Snap.hsl2rgb" class="Snap-hsl2rgb-section"><header><h3 id="Snap.hsl2rgb" class="dr-method">Snap.hsl2rgb(h, s, l)<a href="#Snap.hsl2rgb" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 944 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L944">➭</a></h3></header>
|
</div></section></article><article id="Snap.hsl2rgb" class="Snap-hsl2rgb-section"><header><h3 id="Snap.hsl2rgb" class="dr-method">Snap.hsl2rgb(h, s, l)<a href="#Snap.hsl2rgb" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 943 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L943">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.hsl2rgb-extra"></div><div class="dr-method"><p>Converts HSL values to an RGB object
|
<section><div class="extra" id="Snap.hsl2rgb-extra"></div><div class="dr-method"><p>Converts HSL values to an RGB object
|
||||||
</p>
|
</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">h</span>
|
<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">h</span>
|
||||||
|
@ -1549,7 +1549,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<li><span class="dr-json-key">b</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">blue,</span>
|
<li><span class="dr-json-key">b</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">blue,</span>
|
||||||
<li><span class="dr-json-key">hex</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">color in HTML/CSS format: #••••••</span>
|
<li><span class="dr-json-key">hex</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">color in HTML/CSS format: #••••••</span>
|
||||||
</ol></li><li>}</li></ol>
|
</ol></li><li>}</li></ol>
|
||||||
</div></section></article><article id="Snap.is" class="Snap-is-section"><header><h3 id="Snap.is" class="dr-method">Snap.is(o, type)<a href="#Snap.is" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 317 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L317">➭</a></h3></header>
|
</div></section></article><article id="Snap.is" class="Snap-is-section"><header><h3 id="Snap.is" class="dr-method">Snap.is(o, type)<a href="#Snap.is" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 316 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L316">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.is-extra"></div><div class="dr-method"><p>Handy replacement for the <code>typeof</code> operator
|
<section><div class="extra" id="Snap.is-extra"></div><div class="dr-method"><p>Handy replacement for the <code>typeof</code> operator
|
||||||
</p>
|
</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">o</span>
|
<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">o</span>
|
||||||
|
@ -1560,7 +1560,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<span class="dr-description">name of the type, e.g., <code>string</code>, <code>function</code>, <code>number</code>, etc.</span></li>
|
<span class="dr-description">name of the type, e.g., <code>string</code>, <code>function</code>, <code>number</code>, etc.</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description"><code>true</code> if given value is of given type</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description"><code>true</code> if given value is of given type</span></p>
|
||||||
</div></section></article><article id="Snap.load" class="Snap-load-section"><header><h3 id="Snap.load" class="dr-method">Snap.load(url, callback, [scope])<a href="#Snap.load" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 3029 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L3029">➭</a></h3></header>
|
</div></section></article><article id="Snap.load" class="Snap-load-section"><header><h3 id="Snap.load" class="dr-method">Snap.load(url, callback, [scope])<a href="#Snap.load" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 3017 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L3017">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.load-extra"></div><div class="dr-method"><p>Loads external SVG file as a <a href="#Fragment" class="dr-link">Fragment</a> (see <a href="#Snap.ajax" class="dr-link">Snap.ajax</a> for more advanced AJAX)
|
<section><div class="extra" id="Snap.load-extra"></div><div class="dr-method"><p>Loads external SVG file as a <a href="#Fragment" class="dr-link">Fragment</a> (see <a href="#Snap.ajax" class="dr-link">Snap.ajax</a> for more advanced AJAX)
|
||||||
</p>
|
</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">url</span>
|
<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">url</span>
|
||||||
|
@ -1574,7 +1574,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<span class="dr-type"><em class="dr-type-object">object</em></span>
|
<span class="dr-type"><em class="dr-type-object">object</em></span>
|
||||||
<span class="dr-description">scope of callback</span></li>
|
<span class="dr-description">scope of callback</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
</div></section></article><article id="Snap.parse" class="Snap-parse-section"><header><h3 id="Snap.parse" class="dr-method">Snap.parse(svg)<a href="#Snap.parse" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2293 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2293">➭</a></h3></header>
|
</div></section></article><article id="Snap.parse" class="Snap-parse-section"><header><h3 id="Snap.parse" class="dr-method">Snap.parse(svg)<a href="#Snap.parse" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2281 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2281">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.parse-extra"></div><div class="dr-method"><p>Parses SVG fragment and converts it into a <a href="#Fragment" class="dr-link">Fragment</a>
|
<section><div class="extra" id="Snap.parse-extra"></div><div class="dr-method"><p>Parses SVG fragment and converts it into a <a href="#Fragment" class="dr-link">Fragment</a>
|
||||||
</p>
|
</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">svg</span>
|
<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">svg</span>
|
||||||
|
@ -1582,7 +1582,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<span class="dr-description">SVG string</span></li>
|
<span class="dr-description">SVG string</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Fragment">Fragment</em> <span class="dr-description">the <a href="#Fragment" class="dr-link">Fragment</a></span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Fragment">Fragment</em> <span class="dr-description">the <a href="#Fragment" class="dr-link">Fragment</a></span></p>
|
||||||
</div></section></article><article id="Snap.parsePathString" class="Snap-parsePathString-section"><header><h3 id="Snap.parsePathString" class="dr-method">Snap.parsePathString(pathString)<a href="#Snap.parsePathString" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1050 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1050">➭</a></h3></header>
|
</div></section></article><article id="Snap.parsePathString" class="Snap-parsePathString-section"><header><h3 id="Snap.parsePathString" class="dr-method">Snap.parsePathString(pathString)<a href="#Snap.parsePathString" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1049 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1049">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.parsePathString-extra"></div><div class="dr-method"><p>Utility method
|
<section><div class="extra" id="Snap.parsePathString-extra"></div><div class="dr-method"><p>Utility method
|
||||||
Parses given path string into an array of arrays of path segments
|
Parses given path string into an array of arrays of path segments
|
||||||
</p>
|
</p>
|
||||||
|
@ -1591,7 +1591,7 @@ Parses given path string into an array of arrays of path segments
|
||||||
<span class="dr-description">path string or array of segments (in the last case it is returned straight away)</span></li>
|
<span class="dr-description">path string or array of segments (in the last case it is returned straight away)</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">array of segments</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">array of segments</span></p>
|
||||||
</div></section></article><article id="Snap.parseTransformString" class="Snap-parseTransformString-section"><header><h3 id="Snap.parseTransformString" class="dr-method">Snap.parseTransformString(TString)<a href="#Snap.parseTransformString" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1103 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1103">➭</a></h3></header>
|
</div></section></article><article id="Snap.parseTransformString" class="Snap-parseTransformString-section"><header><h3 id="Snap.parseTransformString" class="dr-method">Snap.parseTransformString(TString)<a href="#Snap.parseTransformString" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1102 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1102">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.parseTransformString-extra"></div><div class="dr-method"><p>Utility method
|
<section><div class="extra" id="Snap.parseTransformString-extra"></div><div class="dr-method"><p>Utility method
|
||||||
Parses given transform string into an array of transformations
|
Parses given transform string into an array of transformations
|
||||||
</p>
|
</p>
|
||||||
|
@ -1601,7 +1601,7 @@ Parses given transform string into an array of transformations
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">array of transformations</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">array of transformations</span></p>
|
||||||
</div></section></article><article id="Snap.path" class="Snap-path-section"><header><h3 id="Snap.path" class="undefined">Snap.path<a href="#Snap.path" title="Link to this section" class="dr-hash">⚓</a></h3></header>
|
</div></section></article><article id="Snap.path" class="Snap-path-section"><header><h3 id="Snap.path" class="undefined">Snap.path<a href="#Snap.path" title="Link to this section" class="dr-hash">⚓</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.path-extra"></div></section></article><article id="Snap.path.bezierBBox" class="Snap-path-bezierBBox-section"><header><h4 id="Snap.path.bezierBBox" class="dr-method">Snap.path.bezierBBox(…)<a href="#Snap.path.bezierBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1212 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1212">➭</a></h4></header>
|
<section><div class="extra" id="Snap.path-extra"></div></section></article><article id="Snap.path.bezierBBox" class="Snap-path-bezierBBox-section"><header><h4 id="Snap.path.bezierBBox" class="dr-method">Snap.path.bezierBBox(…)<a href="#Snap.path.bezierBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1220 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1220">➭</a></h4></header>
|
||||||
<section><div class="extra" id="Snap.path.bezierBBox-extra"></div><div class="dr-method"><p>Utility method
|
<section><div class="extra" id="Snap.path.bezierBBox-extra"></div><div class="dr-method"><p>Utility method
|
||||||
Returns the bounding box of a given cubic beziér curve
|
Returns the bounding box of a given cubic beziér curve
|
||||||
</p>
|
</p>
|
||||||
|
@ -1644,7 +1644,7 @@ Returns the bounding box of a given cubic beziér curve
|
||||||
<li><span class="dr-json-key">width:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">width of the box,</span>
|
<li><span class="dr-json-key">width:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">width of the box,</span>
|
||||||
<li><span class="dr-json-key">height:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">height of the box</span>
|
<li><span class="dr-json-key">height:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">height of the box</span>
|
||||||
</ol></li><li>}</li></ol>
|
</ol></li><li>}</li></ol>
|
||||||
</div></section></article><article id="Snap.path.findDotsAtSegment" class="Snap-path-findDotsAtSegment-section"><header><h4 id="Snap.path.findDotsAtSegment" class="dr-method">Snap.path.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t)<a href="#Snap.path.findDotsAtSegment" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1184 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1184">➭</a></h4></header>
|
</div></section></article><article id="Snap.path.findDotsAtSegment" class="Snap-path-findDotsAtSegment-section"><header><h4 id="Snap.path.findDotsAtSegment" class="dr-method">Snap.path.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t)<a href="#Snap.path.findDotsAtSegment" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1192 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1192">➭</a></h4></header>
|
||||||
<section><div class="extra" id="Snap.path.findDotsAtSegment-extra"></div><div class="dr-method"><p>Utility method
|
<section><div class="extra" id="Snap.path.findDotsAtSegment-extra"></div><div class="dr-method"><p>Utility method
|
||||||
Finds dot coordinates on the given cubic beziér curve at the given t
|
Finds dot coordinates on the given cubic beziér curve at the given t
|
||||||
</p>
|
</p>
|
||||||
|
@ -1689,7 +1689,7 @@ Finds dot coordinates on the given cubic beziér curve at the given t
|
||||||
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate of the end of the curve</span>
|
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate of the end of the curve</span>
|
||||||
</ol></li><li> },</li><li><span class="dr-json-key">alpha:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">angle of the curve derivative at the point</span>
|
</ol></li><li> },</li><li><span class="dr-json-key">alpha:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">angle of the curve derivative at the point</span>
|
||||||
</ol></li><li>}</li></ol>
|
</ol></li><li>}</li></ol>
|
||||||
</div></section></article><article id="Snap.path.getBBox" class="Snap-path-getBBox-section"><header><h4 id="Snap.path.getBBox" class="dr-method">Snap.path.getBBox(path)<a href="#Snap.path.getBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1296 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1296">➭</a></h4></header>
|
</div></section></article><article id="Snap.path.getBBox" class="Snap-path-getBBox-section"><header><h4 id="Snap.path.getBBox" class="dr-method">Snap.path.getBBox(path)<a href="#Snap.path.getBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1304 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1304">➭</a></h4></header>
|
||||||
<section><div class="extra" id="Snap.path.getBBox-extra"></div><div class="dr-method"><p>Utility method
|
<section><div class="extra" id="Snap.path.getBBox-extra"></div><div class="dr-method"><p>Utility method
|
||||||
Returns the bounding box of a given path
|
Returns the bounding box of a given path
|
||||||
</p>
|
</p>
|
||||||
|
@ -1705,7 +1705,7 @@ Returns the bounding box of a given path
|
||||||
<li><span class="dr-json-key">width:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">width of the box,</span>
|
<li><span class="dr-json-key">width:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">width of the box,</span>
|
||||||
<li><span class="dr-json-key">height:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">height of the box</span>
|
<li><span class="dr-json-key">height:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">height of the box</span>
|
||||||
</ol></li><li>}</li></ol>
|
</ol></li><li>}</li></ol>
|
||||||
</div></section></article><article id="Snap.path.getPointAtLength" class="Snap-path-getPointAtLength-section"><header><h4 id="Snap.path.getPointAtLength" class="dr-method">Snap.path.getPointAtLength(path, length)<a href="#Snap.path.getPointAtLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1078 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1078">➭</a></h4></header>
|
</div></section></article><article id="Snap.path.getPointAtLength" class="Snap-path-getPointAtLength-section"><header><h4 id="Snap.path.getPointAtLength" class="dr-method">Snap.path.getPointAtLength(path, length)<a href="#Snap.path.getPointAtLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1086 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1086">➭</a></h4></header>
|
||||||
<section><div class="extra" id="Snap.path.getPointAtLength-extra"></div><div class="dr-method"><p>Returns the coordinates of the point located at the given length along the given path
|
<section><div class="extra" id="Snap.path.getPointAtLength-extra"></div><div class="dr-method"><p>Returns the coordinates of the point located at the given length along the given path
|
||||||
</p>
|
</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">path</span>
|
<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">path</span>
|
||||||
|
@ -1720,7 +1720,7 @@ Returns the bounding box of a given path
|
||||||
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate,</span>
|
<li><span class="dr-json-key">y:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">y coordinate,</span>
|
||||||
<li><span class="dr-json-key">alpha:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">angle of derivative</span>
|
<li><span class="dr-json-key">alpha:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">angle of derivative</span>
|
||||||
</ol></li><li>}</li></ol>
|
</ol></li><li>}</li></ol>
|
||||||
</div></section></article><article id="Snap.path.getSubpath" class="Snap-path-getSubpath-section"><header><h4 id="Snap.path.getSubpath" class="dr-method">Snap.path.getSubpath(path, from, to)<a href="#Snap.path.getSubpath" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1091 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1091">➭</a></h4></header>
|
</div></section></article><article id="Snap.path.getSubpath" class="Snap-path-getSubpath-section"><header><h4 id="Snap.path.getSubpath" class="dr-method">Snap.path.getSubpath(path, from, to)<a href="#Snap.path.getSubpath" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1099 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1099">➭</a></h4></header>
|
||||||
<section><div class="extra" id="Snap.path.getSubpath-extra"></div><div class="dr-method"><p>Returns the subpath of a given path between given start and end lengths
|
<section><div class="extra" id="Snap.path.getSubpath-extra"></div><div class="dr-method"><p>Returns the subpath of a given path between given start and end lengths
|
||||||
</p>
|
</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">path</span>
|
<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">path</span>
|
||||||
|
@ -1734,7 +1734,7 @@ Returns the bounding box of a given path
|
||||||
<span class="dr-description">length, in pixels, from the start of the path to the end of the segment</span></li>
|
<span class="dr-description">length, in pixels, from the start of the path to the end of the segment</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">path string definition for the segment</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">path string definition for the segment</span></p>
|
||||||
</div></section></article><article id="Snap.path.getTotalLength" class="Snap-path-getTotalLength-section"><header><h4 id="Snap.path.getTotalLength" class="dr-method">Snap.path.getTotalLength(path)<a href="#Snap.path.getTotalLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1061 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1061">➭</a></h4></header>
|
</div></section></article><article id="Snap.path.getTotalLength" class="Snap-path-getTotalLength-section"><header><h4 id="Snap.path.getTotalLength" class="dr-method">Snap.path.getTotalLength(path)<a href="#Snap.path.getTotalLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1069 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1069">➭</a></h4></header>
|
||||||
<section><div class="extra" id="Snap.path.getTotalLength-extra"></div><div class="dr-method"><p>Returns the length of the given path in pixels
|
<section><div class="extra" id="Snap.path.getTotalLength-extra"></div><div class="dr-method"><p>Returns the length of the given path in pixels
|
||||||
</p>
|
</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">path</span>
|
<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">path</span>
|
||||||
|
@ -1742,7 +1742,7 @@ Returns the bounding box of a given path
|
||||||
<span class="dr-description">SVG path string</span></li>
|
<span class="dr-description">SVG path string</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">length</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">length</span></p>
|
||||||
</div></section></article><article id="Snap.path.intersection" class="Snap-path-intersection-section"><header><h4 id="Snap.path.intersection" class="dr-method">Snap.path.intersection(path1, path2)<a href="#Snap.path.intersection" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1261 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1261">➭</a></h4></header>
|
</div></section></article><article id="Snap.path.intersection" class="Snap-path-intersection-section"><header><h4 id="Snap.path.intersection" class="dr-method">Snap.path.intersection(path1, path2)<a href="#Snap.path.intersection" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1269 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1269">➭</a></h4></header>
|
||||||
<section><div class="extra" id="Snap.path.intersection-extra"></div><div class="dr-method"><p>Utility method
|
<section><div class="extra" id="Snap.path.intersection-extra"></div><div class="dr-method"><p>Utility method
|
||||||
Finds intersections of two paths
|
Finds intersections of two paths
|
||||||
</p>
|
</p>
|
||||||
|
@ -1763,7 +1763,7 @@ Finds intersections of two paths
|
||||||
<li><span class="dr-json-key">bez1:</span><span class="dr-type"><em class="dr-type-array">array</em></span><span class="dr-json-description">eight coordinates representing beziér curve for the segment of path1,</span>
|
<li><span class="dr-json-key">bez1:</span><span class="dr-type"><em class="dr-type-array">array</em></span><span class="dr-json-description">eight coordinates representing beziér curve for the segment of path1,</span>
|
||||||
<li><span class="dr-json-key">bez2:</span><span class="dr-type"><em class="dr-type-array">array</em></span><span class="dr-json-description">eight coordinates representing beziér curve for the segment of path2</span>
|
<li><span class="dr-json-key">bez2:</span><span class="dr-type"><em class="dr-type-array">array</em></span><span class="dr-json-description">eight coordinates representing beziér curve for the segment of path2</span>
|
||||||
</ol></li><li> }</li><li>]</ol>
|
</ol></li><li> }</li><li>]</ol>
|
||||||
</div></section></article><article id="Snap.path.isBBoxIntersect" class="Snap-path-isBBoxIntersect-section"><header><h4 id="Snap.path.isBBoxIntersect" class="dr-method">Snap.path.isBBoxIntersect(bbox1, bbox2)<a href="#Snap.path.isBBoxIntersect" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1237 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1237">➭</a></h4></header>
|
</div></section></article><article id="Snap.path.isBBoxIntersect" class="Snap-path-isBBoxIntersect-section"><header><h4 id="Snap.path.isBBoxIntersect" class="dr-method">Snap.path.isBBoxIntersect(bbox1, bbox2)<a href="#Snap.path.isBBoxIntersect" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1245 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1245">➭</a></h4></header>
|
||||||
<section><div class="extra" id="Snap.path.isBBoxIntersect-extra"></div><div class="dr-method"><p>Utility method
|
<section><div class="extra" id="Snap.path.isBBoxIntersect-extra"></div><div class="dr-method"><p>Utility method
|
||||||
Returns <code>true</code> if two bounding boxes intersect
|
Returns <code>true</code> if two bounding boxes intersect
|
||||||
</p>
|
</p>
|
||||||
|
@ -1775,7 +1775,7 @@ Returns <code>true</code> if two bounding boxes intersect
|
||||||
<span class="dr-description">second bounding box</span></li>
|
<span class="dr-description">second bounding box</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description"><code>true</code> if bounding boxes intersect</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description"><code>true</code> if bounding boxes intersect</span></p>
|
||||||
</div></section></article><article id="Snap.path.isPointInside" class="Snap-path-isPointInside-section"><header><h4 id="Snap.path.isPointInside" class="dr-method">Snap.path.isPointInside(path, x, y)<a href="#Snap.path.isPointInside" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1277 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1277">➭</a></h4></header>
|
</div></section></article><article id="Snap.path.isPointInside" class="Snap-path-isPointInside-section"><header><h4 id="Snap.path.isPointInside" class="dr-method">Snap.path.isPointInside(path, x, y)<a href="#Snap.path.isPointInside" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1285 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1285">➭</a></h4></header>
|
||||||
<section><div class="extra" id="Snap.path.isPointInside-extra"></div><div class="dr-method"><p>Utility method
|
<section><div class="extra" id="Snap.path.isPointInside-extra"></div><div class="dr-method"><p>Utility method
|
||||||
Returns <code>true</code> if given point is inside a given closed path.
|
Returns <code>true</code> if given point is inside a given closed path.
|
||||||
</p>
|
</p>
|
||||||
|
@ -1792,7 +1792,7 @@ Returns <code>true</code> if given point is inside a given closed path.
|
||||||
<span class="dr-description">y of the point</span></li>
|
<span class="dr-description">y of the point</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description"><code>true</code> if point is inside the path</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description"><code>true</code> if point is inside the path</span></p>
|
||||||
</div></section></article><article id="Snap.path.isPointInsideBBox" class="Snap-path-isPointInsideBBox-section"><header><h4 id="Snap.path.isPointInsideBBox" class="dr-method">Snap.path.isPointInsideBBox(bbox, x, y)<a href="#Snap.path.isPointInsideBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1225 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1225">➭</a></h4></header>
|
</div></section></article><article id="Snap.path.isPointInsideBBox" class="Snap-path-isPointInsideBBox-section"><header><h4 id="Snap.path.isPointInsideBBox" class="dr-method">Snap.path.isPointInsideBBox(bbox, x, y)<a href="#Snap.path.isPointInsideBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1233 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1233">➭</a></h4></header>
|
||||||
<section><div class="extra" id="Snap.path.isPointInsideBBox-extra"></div><div class="dr-method"><p>Utility method
|
<section><div class="extra" id="Snap.path.isPointInsideBBox-extra"></div><div class="dr-method"><p>Utility method
|
||||||
Returns <code>true</code> if given point is inside bounding box
|
Returns <code>true</code> if given point is inside bounding box
|
||||||
</p>
|
</p>
|
||||||
|
@ -1807,7 +1807,7 @@ Returns <code>true</code> if given point is inside bounding box
|
||||||
<span class="dr-description">y coordinate of the point</span></li>
|
<span class="dr-description">y coordinate of the point</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description"><code>true</code> if point is inside</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description"><code>true</code> if point is inside</span></p>
|
||||||
</div></section></article><article id="Snap.path.map" class="Snap-path-map-section"><header><h4 id="Snap.path.map" class="dr-method">Snap.path.map(path, matrix)<a href="#Snap.path.map" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1340 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1340">➭</a></h4></header>
|
</div></section></article><article id="Snap.path.map" class="Snap-path-map-section"><header><h4 id="Snap.path.map" class="dr-method">Snap.path.map(path, matrix)<a href="#Snap.path.map" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1348 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1348">➭</a></h4></header>
|
||||||
<section><div class="extra" id="Snap.path.map-extra"></div><div class="dr-method"><p>Transform the path string with the given matrix
|
<section><div class="extra" id="Snap.path.map-extra"></div><div class="dr-method"><p>Transform the path string with the given matrix
|
||||||
</p>
|
</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">path</span>
|
<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">path</span>
|
||||||
|
@ -1818,7 +1818,7 @@ Returns <code>true</code> if given point is inside bounding box
|
||||||
<span class="dr-description">see <a href="#Matrix" class="dr-link">Matrix</a></span></li>
|
<span class="dr-description">see <a href="#Matrix" class="dr-link">Matrix</a></span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">transformed path string</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">transformed path string</span></p>
|
||||||
</div></section></article><article id="Snap.path.toAbsolute" class="Snap-path-toAbsolute-section"><header><h4 id="Snap.path.toAbsolute" class="dr-method">Snap.path.toAbsolute(path)<a href="#Snap.path.toAbsolute" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1319 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1319">➭</a></h4></header>
|
</div></section></article><article id="Snap.path.toAbsolute" class="Snap-path-toAbsolute-section"><header><h4 id="Snap.path.toAbsolute" class="dr-method">Snap.path.toAbsolute(path)<a href="#Snap.path.toAbsolute" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1327 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1327">➭</a></h4></header>
|
||||||
<section><div class="extra" id="Snap.path.toAbsolute-extra"></div><div class="dr-method"><p>Utility method
|
<section><div class="extra" id="Snap.path.toAbsolute-extra"></div><div class="dr-method"><p>Utility method
|
||||||
Converts path coordinates into absolute values
|
Converts path coordinates into absolute values
|
||||||
</p>
|
</p>
|
||||||
|
@ -1827,7 +1827,7 @@ Converts path coordinates into absolute values
|
||||||
<span class="dr-description">path string</span></li>
|
<span class="dr-description">path string</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">path string</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">path string</span></p>
|
||||||
</div></section></article><article id="Snap.path.toCubic" class="Snap-path-toCubic-section"><header><h4 id="Snap.path.toCubic" class="dr-method">Snap.path.toCubic(pathString)<a href="#Snap.path.toCubic" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1330 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1330">➭</a></h4></header>
|
</div></section></article><article id="Snap.path.toCubic" class="Snap-path-toCubic-section"><header><h4 id="Snap.path.toCubic" class="dr-method">Snap.path.toCubic(pathString)<a href="#Snap.path.toCubic" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1338 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1338">➭</a></h4></header>
|
||||||
<section><div class="extra" id="Snap.path.toCubic-extra"></div><div class="dr-method"><p>Utility method
|
<section><div class="extra" id="Snap.path.toCubic-extra"></div><div class="dr-method"><p>Utility method
|
||||||
Converts path to a new path where all segments are cubic beziér curves
|
Converts path to a new path where all segments are cubic beziér curves
|
||||||
</p>
|
</p>
|
||||||
|
@ -1836,7 +1836,7 @@ Converts path to a new path where all segments are cubic beziér curves
|
||||||
<span class="dr-description">path string or array of segments</span></li>
|
<span class="dr-description">path string or array of segments</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">array of segments</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">array of segments</span></p>
|
||||||
</div></section></article><article id="Snap.path.toRelative" class="Snap-path-toRelative-section"><header><h4 id="Snap.path.toRelative" class="dr-method">Snap.path.toRelative(path)<a href="#Snap.path.toRelative" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1308 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1308">➭</a></h4></header>
|
</div></section></article><article id="Snap.path.toRelative" class="Snap-path-toRelative-section"><header><h4 id="Snap.path.toRelative" class="dr-method">Snap.path.toRelative(path)<a href="#Snap.path.toRelative" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1316 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1316">➭</a></h4></header>
|
||||||
<section><div class="extra" id="Snap.path.toRelative-extra"></div><div class="dr-method"><p>Utility method
|
<section><div class="extra" id="Snap.path.toRelative-extra"></div><div class="dr-method"><p>Utility method
|
||||||
Converts path coordinates into relative values
|
Converts path coordinates into relative values
|
||||||
</p>
|
</p>
|
||||||
|
@ -1845,7 +1845,7 @@ Converts path coordinates into relative values
|
||||||
<span class="dr-description">path string</span></li>
|
<span class="dr-description">path string</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">path string</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">path string</span></p>
|
||||||
</div></section></article><article id="Snap.rad" class="Snap-rad-section"><header><h3 id="Snap.rad" class="dr-method">Snap.rad(deg)<a href="#Snap.rad" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 282 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L282">➭</a></h3></header>
|
</div></section></article><article id="Snap.rad" class="Snap-rad-section"><header><h3 id="Snap.rad" class="dr-method">Snap.rad(deg)<a href="#Snap.rad" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 281 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L281">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.rad-extra"></div><div class="dr-method"><p>Transform angle to radians
|
<section><div class="extra" id="Snap.rad-extra"></div><div class="dr-method"><p>Transform angle to radians
|
||||||
</p>
|
</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">deg</span>
|
<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">deg</span>
|
||||||
|
@ -1853,7 +1853,7 @@ Converts path coordinates into relative values
|
||||||
<span class="dr-description">angle in degrees</span></li>
|
<span class="dr-description">angle in degrees</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">angle in radians</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">angle in radians</span></p>
|
||||||
</div></section></article><article id="Snap.rgb" class="Snap-rgb-section"><header><h3 id="Snap.rgb" class="dr-method">Snap.rgb(r, g, b)<a href="#Snap.rgb" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 769 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L769">➭</a></h3></header>
|
</div></section></article><article id="Snap.rgb" class="Snap-rgb-section"><header><h3 id="Snap.rgb" class="dr-method">Snap.rgb(r, g, b)<a href="#Snap.rgb" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 768 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L768">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.rgb-extra"></div><div class="dr-method"><p>Converts RGB values to a hex representation of the color
|
<section><div class="extra" id="Snap.rgb-extra"></div><div class="dr-method"><p>Converts RGB values to a hex representation of the color
|
||||||
</p>
|
</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">r</span>
|
<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">r</span>
|
||||||
|
@ -1867,7 +1867,7 @@ Converts path coordinates into relative values
|
||||||
<span class="dr-description">blue</span></li>
|
<span class="dr-description">blue</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">hex representation of the color</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">hex representation of the color</span></p>
|
||||||
</div></section></article><article id="Snap.rgb2hsb" class="Snap-rgb2hsb-section"><header><h3 id="Snap.rgb2hsb" class="dr-method">Snap.rgb2hsb(r, g, b)<a href="#Snap.rgb2hsb" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 983 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L983">➭</a></h3></header>
|
</div></section></article><article id="Snap.rgb2hsb" class="Snap-rgb2hsb-section"><header><h3 id="Snap.rgb2hsb" class="dr-method">Snap.rgb2hsb(r, g, b)<a href="#Snap.rgb2hsb" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 982 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L982">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.rgb2hsb-extra"></div><div class="dr-method"><p>Converts RGB values to an HSB object
|
<section><div class="extra" id="Snap.rgb2hsb-extra"></div><div class="dr-method"><p>Converts RGB values to an HSB object
|
||||||
</p>
|
</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">r</span>
|
<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">r</span>
|
||||||
|
@ -1885,7 +1885,7 @@ Converts path coordinates into relative values
|
||||||
<li><span class="dr-json-key">s</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">saturation,</span>
|
<li><span class="dr-json-key">s</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">saturation,</span>
|
||||||
<li><span class="dr-json-key">b</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">brightness</span>
|
<li><span class="dr-json-key">b</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">brightness</span>
|
||||||
</ol></li><li>}</li></ol>
|
</ol></li><li>}</li></ol>
|
||||||
</div></section></article><article id="Snap.rgb2hsl" class="Snap-rgb2hsl-section"><header><h3 id="Snap.rgb2hsl" class="dr-method">Snap.rgb2hsl(r, g, b)<a href="#Snap.rgb2hsl" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1016 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1016">➭</a></h3></header>
|
</div></section></article><article id="Snap.rgb2hsl" class="Snap-rgb2hsl-section"><header><h3 id="Snap.rgb2hsl" class="dr-method">Snap.rgb2hsl(r, g, b)<a href="#Snap.rgb2hsl" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1015 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1015">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.rgb2hsl-extra"></div><div class="dr-method"><p>Converts RGB values to an HSL object
|
<section><div class="extra" id="Snap.rgb2hsl-extra"></div><div class="dr-method"><p>Converts RGB values to an HSL object
|
||||||
</p>
|
</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">r</span>
|
<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">r</span>
|
||||||
|
@ -1903,7 +1903,7 @@ Converts path coordinates into relative values
|
||||||
<li><span class="dr-json-key">s</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">saturation,</span>
|
<li><span class="dr-json-key">s</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">saturation,</span>
|
||||||
<li><span class="dr-json-key">l</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">luminosity</span>
|
<li><span class="dr-json-key">l</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">luminosity</span>
|
||||||
</ol></li><li>}</li></ol>
|
</ol></li><li>}</li></ol>
|
||||||
</div></section></article><article id="Snap.select" class="Snap-select-section"><header><h3 id="Snap.select" class="dr-method">Snap.select(query)<a href="#Snap.select" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1359 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1359">➭</a></h3></header>
|
</div></section></article><article id="Snap.select" class="Snap-select-section"><header><h3 id="Snap.select" class="dr-method">Snap.select(query)<a href="#Snap.select" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1358 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1358">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.select-extra"></div><div class="dr-method"><p>Wraps a DOM element specified by CSS selector as <a href="#Element" class="dr-link">Element</a>
|
<section><div class="extra" id="Snap.select-extra"></div><div class="dr-method"><p>Wraps a DOM element specified by CSS selector as <a href="#Element" class="dr-link">Element</a>
|
||||||
</p>
|
</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">query</span>
|
<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">query</span>
|
||||||
|
@ -1911,7 +1911,7 @@ Converts path coordinates into relative values
|
||||||
<span class="dr-description">CSS selector of the element</span></li>
|
<span class="dr-description">CSS selector of the element</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the current element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the current element</span></p>
|
||||||
</div></section></article><article id="Snap.selectAll" class="Snap-selectAll-section"><header><h3 id="Snap.selectAll" class="dr-method">Snap.selectAll(query)<a href="#Snap.selectAll" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1370 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1370">➭</a></h3></header>
|
</div></section></article><article id="Snap.selectAll" class="Snap-selectAll-section"><header><h3 id="Snap.selectAll" class="dr-method">Snap.selectAll(query)<a href="#Snap.selectAll" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1369 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1369">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.selectAll-extra"></div><div class="dr-method"><p>Wraps DOM elements specified by CSS selector as set or array of <a href="#Element" class="dr-link">Element</a>
|
<section><div class="extra" id="Snap.selectAll-extra"></div><div class="dr-method"><p>Wraps DOM elements specified by CSS selector as set or array of <a href="#Element" class="dr-link">Element</a>
|
||||||
</p>
|
</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">query</span>
|
<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">query</span>
|
||||||
|
@ -1919,7 +1919,7 @@ Converts path coordinates into relative values
|
||||||
<span class="dr-description">CSS selector of the element</span></li>
|
<span class="dr-description">CSS selector of the element</span></li>
|
||||||
</ol></div>
|
</ol></div>
|
||||||
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the current element</span></p>
|
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the current element</span></p>
|
||||||
</div></section></article><article id="Snap.snapTo" class="Snap-snapTo-section"><header><h3 id="Snap.snapTo" class="dr-method">Snap.snapTo(values, value, [tolerance])<a href="#Snap.snapTo" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 328 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L328">➭</a></h3></header>
|
</div></section></article><article id="Snap.snapTo" class="Snap-snapTo-section"><header><h3 id="Snap.snapTo" class="dr-method">Snap.snapTo(values, value, [tolerance])<a href="#Snap.snapTo" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 327 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L327">➭</a></h3></header>
|
||||||
<section><div class="extra" id="Snap.snapTo-extra"></div><div class="dr-method"><p>Snaps given value to given grid
|
<section><div class="extra" id="Snap.snapTo-extra"></div><div class="dr-method"><p>Snaps given value to given grid
|
||||||
</p>
|
</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">values</span>
|
<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">values</span>
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1,4 +1,4 @@
|
||||||
// Snap.svg 0.0.1
|
// Snap.svg 0.1.1
|
||||||
//
|
//
|
||||||
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
|
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
|
||||||
//
|
//
|
||||||
|
@ -14,7 +14,7 @@
|
||||||
// See the License for the specific language governing permissions and
|
// See the License for the specific language governing permissions and
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
//
|
//
|
||||||
// build: 2013-10-21
|
// build: 2013-10-25
|
||||||
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
|
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@ -445,7 +445,7 @@ var mina = (function (eve) {
|
||||||
return a + dif * (bb - b);
|
return a + dif * (bb - b);
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
timer = function () {
|
timer = Date.now || function () {
|
||||||
return +new Date;
|
return +new Date;
|
||||||
},
|
},
|
||||||
sta = function (val) {
|
sta = function (val) {
|
||||||
|
@ -744,357 +744,6 @@ var mina = (function (eve) {
|
||||||
window.mina = mina;
|
window.mina = mina;
|
||||||
return mina;
|
return mina;
|
||||||
})(typeof eve == "undefined" ? function () {} : eve);
|
})(typeof eve == "undefined" ? function () {} : eve);
|
||||||
/*
|
|
||||||
* Elemental 0.2.4 - Simple JavaScript Tag Parser
|
|
||||||
*
|
|
||||||
* Copyright (c) 2010 - 2013 Dmitry Baranovskiy (http://dmitry.baranovskiy.com/)
|
|
||||||
* Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
|
|
||||||
*/
|
|
||||||
|
|
||||||
(function () {
|
|
||||||
function parse(s) {
|
|
||||||
s = s || Object(s);
|
|
||||||
var pos = 1,
|
|
||||||
len = s.length + 1,
|
|
||||||
p, c, n = at(s, 0);
|
|
||||||
for (;pos < len; pos++) {
|
|
||||||
p = c;
|
|
||||||
c = n;
|
|
||||||
n = at(s, pos);
|
|
||||||
this.raw += c;
|
|
||||||
step.call(this, c, n, p);
|
|
||||||
}
|
|
||||||
this._beforeEnd = function () {
|
|
||||||
step.call(this, "", "", c);
|
|
||||||
};
|
|
||||||
return this;
|
|
||||||
}
|
|
||||||
|
|
||||||
function at(s, i) {
|
|
||||||
return s && (s.charAt ? s.charAt(i) : s[i]);
|
|
||||||
}
|
|
||||||
|
|
||||||
function on(name, f) {
|
|
||||||
this.events = this.events || {};
|
|
||||||
this.events[name] = this.events[name] || [];
|
|
||||||
this.events[name].push(f);
|
|
||||||
}
|
|
||||||
|
|
||||||
function event(name, data, extra) {
|
|
||||||
if (typeof eve == "function") {
|
|
||||||
eve("elemental." + name + (data ? "." + data : ""), null, data, extra || "", this.raw);
|
|
||||||
}
|
|
||||||
var a = this.events && this.events[name],
|
|
||||||
i = a && a.length;
|
|
||||||
while (i--) try {
|
|
||||||
this.events[name][i](data, extra || "", this.raw);
|
|
||||||
} catch (e) {}
|
|
||||||
this.raw = "";
|
|
||||||
}
|
|
||||||
|
|
||||||
function end() {
|
|
||||||
step.call(this, "eof");
|
|
||||||
this.event("eof");
|
|
||||||
}
|
|
||||||
|
|
||||||
var entities = {
|
|
||||||
"lt": 60,
|
|
||||||
"lt;": 60,
|
|
||||||
"AMP;": 38,
|
|
||||||
"AMP": 38,
|
|
||||||
"GT;": 62,
|
|
||||||
"GT": 62,
|
|
||||||
"QUOT;": 34,
|
|
||||||
"QUOT": 34,
|
|
||||||
"apos;": 39,
|
|
||||||
"bull;": 8226,
|
|
||||||
"bullet;": 8226,
|
|
||||||
"copy;": 169,
|
|
||||||
"copy": 169,
|
|
||||||
"deg;": 176,
|
|
||||||
"deg": 176
|
|
||||||
},
|
|
||||||
whitespace = /[\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u2028\u2029\u202f\u205f\u3000]/,
|
|
||||||
notEntity = /[#\da-z]/i,
|
|
||||||
entity2text = function (entity) {
|
|
||||||
var code;
|
|
||||||
if (entity.charAt() == "#") {
|
|
||||||
if (entity.charAt(1).toLowerCase() == "x") {
|
|
||||||
code = parseInt(entity.substring(2), 16);
|
|
||||||
} else {
|
|
||||||
code = parseInt(entity.substring(1), 10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
code = entities[entity];
|
|
||||||
return code ? String.fromCharCode(code) : ("&" + entity);
|
|
||||||
},
|
|
||||||
fireAttrEvent = function () {
|
|
||||||
for (var key in this.attr) if (this.attr.hasOwnProperty(key)) {
|
|
||||||
this.event("attr", key, {
|
|
||||||
value: this.attr[key],
|
|
||||||
tagname: this.tagname,
|
|
||||||
attr: this.attr
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
|
||||||
act = {
|
|
||||||
text: function (c, n, p) {
|
|
||||||
switch (c) {
|
|
||||||
case "<":
|
|
||||||
case "eof":
|
|
||||||
this.nodename = "";
|
|
||||||
this.attr = {};
|
|
||||||
this.mode = "tag name start";
|
|
||||||
this.raw = this.raw.slice(0, -1);
|
|
||||||
this.textchunk && this.event("text", this.textchunk);
|
|
||||||
this.raw += c;
|
|
||||||
this.textchunk = "";
|
|
||||||
break;
|
|
||||||
case "&":
|
|
||||||
this.mode = "entity";
|
|
||||||
this.entity = "";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
this.textchunk += c;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
entity: function (c, n, p) {
|
|
||||||
if (whitespace.test(c)) {
|
|
||||||
this.textchunk += entity2text(this.entity);
|
|
||||||
this.mode = "text";
|
|
||||||
} else if (c == ";") {
|
|
||||||
this.textchunk += entity2text(this.entity + c);
|
|
||||||
this.mode = "text";
|
|
||||||
} else {
|
|
||||||
this.entity += c;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
special: function (c, n, p) {
|
|
||||||
if (p == "!" && c == "-" && n == "-") {
|
|
||||||
this.mode = "comment start";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.textchunk == "[CDATA" && c == "[") {
|
|
||||||
this.mode = "cdata";
|
|
||||||
this.textchunk = "";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (c == ">" || c == "eof") {
|
|
||||||
this.event("special", this.textchunk);
|
|
||||||
this.mode = "text";
|
|
||||||
this.textchunk = "";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
this.textchunk += c;
|
|
||||||
},
|
|
||||||
cdata: function (c, n, p) {
|
|
||||||
if (p == "]" && c == "]" && n == ">") {
|
|
||||||
this.mode = "cdata end";
|
|
||||||
this.textchunk = this.textchunk.slice(0, -1);
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (c == "eof") {
|
|
||||||
act["cdata end"].call(this);
|
|
||||||
}
|
|
||||||
this.textchunk += c;
|
|
||||||
},
|
|
||||||
"cdata end": function (c, n, p) {
|
|
||||||
this.event("cdata", this.textchunk);
|
|
||||||
this.textchunk = "";
|
|
||||||
this.mode = "text";
|
|
||||||
},
|
|
||||||
"comment start": function (c, n, p) {
|
|
||||||
if (n == ">" || c == "eof") {
|
|
||||||
this.event("comment", "");
|
|
||||||
this.mode = "skip";
|
|
||||||
} else {
|
|
||||||
this.mode = "comment";
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"skip": function (c, n, p) {
|
|
||||||
this.mode = "text";
|
|
||||||
},
|
|
||||||
comment: function (c, n, p) {
|
|
||||||
if (c == "-" && p == "-" && n == ">") {
|
|
||||||
this.mode = "comment end";
|
|
||||||
this.textchunk = this.textchunk.slice(0, -1);
|
|
||||||
} else if (c == "eof") {
|
|
||||||
this.event("comment", this.textchunk);
|
|
||||||
} else {
|
|
||||||
this.textchunk += c;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"comment end": function (c, n, p) {
|
|
||||||
this.event("comment", this.textchunk);
|
|
||||||
this.textchunk = "";
|
|
||||||
this.mode = "text";
|
|
||||||
},
|
|
||||||
declaration: function (c, n, p) {
|
|
||||||
if (c == "?" && n == ">") {
|
|
||||||
this.mode = "declaration end";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (c == "eof") {
|
|
||||||
this.event("comment", this.textchunk);
|
|
||||||
}
|
|
||||||
this.textchunk += c;
|
|
||||||
},
|
|
||||||
"declaration end": function (c, n, p) {
|
|
||||||
this.event("comment", this.textchunk);
|
|
||||||
this.textchunk = "";
|
|
||||||
this.mode = "text";
|
|
||||||
},
|
|
||||||
"tag name start": function (c, n, p) {
|
|
||||||
if (c == "eof") {
|
|
||||||
this.event("text", "<");
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (!whitespace.test(c)) {
|
|
||||||
this.mode = "tag name";
|
|
||||||
if (c == "/") {
|
|
||||||
this.mode = "close tag name start";
|
|
||||||
return;
|
|
||||||
} else if (c == "!") {
|
|
||||||
this.mode = "special";
|
|
||||||
this.textchunk = "";
|
|
||||||
return;
|
|
||||||
} else if (c == "?") {
|
|
||||||
this.mode = "declaration";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
act[this.mode].call(this, c, n, p);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"close tag name start": function (c, n, p) {
|
|
||||||
if (!whitespace.test(c)) {
|
|
||||||
this.mode = "close tag name";
|
|
||||||
this.tagname = "";
|
|
||||||
this.nodename = "";
|
|
||||||
act[this.mode].call(this, c, n, p);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"close tag name": function (c, n, p) {
|
|
||||||
if (whitespace.test(c)) {
|
|
||||||
this.tagname = this.nodename;
|
|
||||||
} else switch (c) {
|
|
||||||
case ">":
|
|
||||||
this.event("/tag", (this.tagname || this.nodename));
|
|
||||||
this.mode = "text";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
!this.tagname && (this.nodename += c);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"tag name": function (c, n, p) {
|
|
||||||
if (whitespace.test(c)) {
|
|
||||||
this.tagname = this.nodename;
|
|
||||||
this.nodename = "";
|
|
||||||
this.mode = "attr start";
|
|
||||||
} else switch (c) {
|
|
||||||
case ">":
|
|
||||||
this.event("tag", this.nodename);
|
|
||||||
this.mode = "text";
|
|
||||||
break;
|
|
||||||
case "/":
|
|
||||||
this.raw += n;
|
|
||||||
this.event("tag", this.nodename);
|
|
||||||
this.event("/tag", this.nodename);
|
|
||||||
this.mode = "skip";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
this.nodename += c;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"attr start": function (c, n, p) {
|
|
||||||
if (!whitespace.test(c)) {
|
|
||||||
this.mode = "attr";
|
|
||||||
this.nodename = "";
|
|
||||||
act[this.mode].call(this, c, n, p);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
attr: function (c, n, p) {
|
|
||||||
if (whitespace.test(c) || c == "=") {
|
|
||||||
this.attr[this.nodename] = "";
|
|
||||||
this.mode = "attr value start";
|
|
||||||
} else switch (c) {
|
|
||||||
case ">":
|
|
||||||
if (this.nodename == "/") {
|
|
||||||
delete this.attr["/"];
|
|
||||||
this.event("tag", this.tagname, this.attr);
|
|
||||||
fireAttrEvent.call(this);
|
|
||||||
this.event("/tag", this.tagname, true);
|
|
||||||
} else {
|
|
||||||
this.nodename && (this.attr[this.nodename] = "");
|
|
||||||
this.event("tag", this.tagname, this.attr);
|
|
||||||
fireAttrEvent.call(this);
|
|
||||||
}
|
|
||||||
this.mode = "text";
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
this.nodename += c;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"attr value start": function (c, n, p) {
|
|
||||||
if (!whitespace.test(c)) {
|
|
||||||
this.mode = "attr value";
|
|
||||||
this.quote = false;
|
|
||||||
if (c == "'" || c == '"') {
|
|
||||||
this.quote = c;
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
act[this.mode].call(this, c, n, p);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"attr value": function (c, n, p) {
|
|
||||||
if (whitespace.test(c) && !this.quote) {
|
|
||||||
this.mode = "attr start";
|
|
||||||
} else if (c == ">" && !this.quote) {
|
|
||||||
this.event("tag", this.tagname, this.attr);
|
|
||||||
this.mode = "text";
|
|
||||||
} else switch (c) {
|
|
||||||
case '"':
|
|
||||||
case "'":
|
|
||||||
if (this.quote == c && p != "\\") {
|
|
||||||
this.mode = "attr start";
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
this.attr[this.nodename] += c;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
function step(c, n, p) {
|
|
||||||
c == "\n" && this.event("newline");
|
|
||||||
act[this.mode].call(this, c, n, p);
|
|
||||||
}
|
|
||||||
|
|
||||||
function elemental(type, ent) {
|
|
||||||
var out = function (s) {
|
|
||||||
out.parse(s);
|
|
||||||
};
|
|
||||||
out.mode = "text";
|
|
||||||
out.type = String(type || "html").toLowerCase();
|
|
||||||
out.textchunk = "";
|
|
||||||
out.raw = "";
|
|
||||||
out.parse = parse;
|
|
||||||
out.on = on;
|
|
||||||
out.event = event;
|
|
||||||
out.end = end;
|
|
||||||
if (ent) {
|
|
||||||
entities = ent;
|
|
||||||
}
|
|
||||||
return out;
|
|
||||||
}
|
|
||||||
elemental.version = "0.2.4";
|
|
||||||
|
|
||||||
(typeof exports == "undefined" ? this : exports).elemental = elemental;
|
|
||||||
})();
|
|
||||||
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
|
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
|
||||||
//
|
//
|
||||||
// Licensed under the Apache License, Version 2.0 (the "License");
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
|
@ -1168,7 +817,6 @@ var has = "hasOwnProperty",
|
||||||
objectToString = Object.prototype.toString,
|
objectToString = Object.prototype.toString,
|
||||||
ISURL = /^url\(['"]?([^\)]+?)['"]?\)$/i,
|
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},
|
|
||||||
bezierrg = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,
|
bezierrg = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,
|
||||||
reURLValue = /^url\(#?([^)]+)\)$/,
|
reURLValue = /^url\(#?([^)]+)\)$/,
|
||||||
spaces = "\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029",
|
spaces = "\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029",
|
||||||
|
@ -1236,7 +884,7 @@ function getAttrs(el) {
|
||||||
function is(o, type) {
|
function is(o, type) {
|
||||||
type = Str.prototype.toLowerCase.call(type);
|
type = Str.prototype.toLowerCase.call(type);
|
||||||
if (type == "finite") {
|
if (type == "finite") {
|
||||||
return !isnan[has](+o);
|
return isFinite(o);
|
||||||
}
|
}
|
||||||
if (type == "array" &&
|
if (type == "array" &&
|
||||||
(o instanceof Array || Array.isArray && Array.isArray(o))) {
|
(o instanceof Array || Array.isArray && Array.isArray(o))) {
|
||||||
|
@ -2619,22 +2267,11 @@ function arrayFirstValue(arr) {
|
||||||
}
|
}
|
||||||
var _ = el._;
|
var _ = el._;
|
||||||
if (isWithoutTransform) {
|
if (isWithoutTransform) {
|
||||||
if (_.dirty || !_.bboxwt) {
|
_.bboxwt = Snap.path.get[el.type] ? Snap.path.getBBox(el.realPath = Snap.path.get[el.type](el)) : Snap._.box(el.node.getBBox());
|
||||||
el.realPath = Snap.path.get[el.type](el);
|
|
||||||
_.bboxwt = Snap.path.getBBox(el.realPath);
|
|
||||||
_.bboxwt.toString = x_y_w_h;
|
|
||||||
_.dirty = 0;
|
|
||||||
}
|
|
||||||
return Snap._.box(_.bboxwt);
|
return Snap._.box(_.bboxwt);
|
||||||
}
|
} else {
|
||||||
if (_.dirty || _.dirtyT || !_.bbox) {
|
el.realPath = (Snap.path.get[el.type] || Snap.path.get.deflt)(el);
|
||||||
if (_.dirty || !el.realPath) {
|
|
||||||
_.bboxwt = 0;
|
|
||||||
el.realPath = Snap.path.get[el.type](el);
|
|
||||||
}
|
|
||||||
_.bbox = Snap.path.getBBox(Snap.path.map(el.realPath, el.matrix));
|
_.bbox = Snap.path.getBBox(Snap.path.map(el.realPath, el.matrix));
|
||||||
_.bbox.toString = x_y_w_h;
|
|
||||||
_.dirty = _.dirtyT = 0;
|
|
||||||
}
|
}
|
||||||
return Snap._.box(_.bbox);
|
return Snap._.box(_.bbox);
|
||||||
};
|
};
|
||||||
|
@ -5380,6 +5017,14 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
|
||||||
},
|
},
|
||||||
polygon: function (el) {
|
polygon: function (el) {
|
||||||
return "M" + el.attr("points") + "z";
|
return "M" + el.attr("points") + "z";
|
||||||
|
},
|
||||||
|
svg: function (el) {
|
||||||
|
var bbox = el.node.getBBox();
|
||||||
|
return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);
|
||||||
|
},
|
||||||
|
deflt: function (el) {
|
||||||
|
var bbox = el.node.getBBox();
|
||||||
|
return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function pathToRelative(pathArray) {
|
function pathToRelative(pathArray) {
|
||||||
|
|
|
@ -528,6 +528,14 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
|
||||||
},
|
},
|
||||||
polygon: function (el) {
|
polygon: function (el) {
|
||||||
return "M" + el.attr("points") + "z";
|
return "M" + el.attr("points") + "z";
|
||||||
|
},
|
||||||
|
svg: function (el) {
|
||||||
|
var bbox = el.node.getBBox();
|
||||||
|
return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);
|
||||||
|
},
|
||||||
|
deflt: function (el) {
|
||||||
|
var bbox = el.node.getBBox();
|
||||||
|
return rectPath(bbox.x, bbox.y, bbox.width, bbox.height);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function pathToRelative(pathArray) {
|
function pathToRelative(pathArray) {
|
||||||
|
|
48
src/svg.js
48
src/svg.js
|
@ -71,7 +71,6 @@ var has = "hasOwnProperty",
|
||||||
objectToString = Object.prototype.toString,
|
objectToString = Object.prototype.toString,
|
||||||
ISURL = /^url\(['"]?([^\)]+?)['"]?\)$/i,
|
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},
|
|
||||||
bezierrg = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,
|
bezierrg = /^(?:cubic-)?bezier\(([^,]+),([^,]+),([^,]+),([^\)]+)\)/,
|
||||||
reURLValue = /^url\(#?([^)]+)\)$/,
|
reURLValue = /^url\(#?([^)]+)\)$/,
|
||||||
spaces = "\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029",
|
spaces = "\x09\x0a\x0b\x0c\x0d\x20\xa0\u1680\u180e\u2000\u2001\u2002\u2003\u2004\u2005\u2006\u2007\u2008\u2009\u200a\u202f\u205f\u3000\u2028\u2029",
|
||||||
|
@ -139,7 +138,7 @@ function getAttrs(el) {
|
||||||
function is(o, type) {
|
function is(o, type) {
|
||||||
type = Str.prototype.toLowerCase.call(type);
|
type = Str.prototype.toLowerCase.call(type);
|
||||||
if (type == "finite") {
|
if (type == "finite") {
|
||||||
return !isnan[has](+o);
|
return isFinite(o);
|
||||||
}
|
}
|
||||||
if (type == "array" &&
|
if (type == "array" &&
|
||||||
(o instanceof Array || Array.isArray && Array.isArray(o))) {
|
(o instanceof Array || Array.isArray && Array.isArray(o))) {
|
||||||
|
@ -1522,22 +1521,11 @@ function arrayFirstValue(arr) {
|
||||||
}
|
}
|
||||||
var _ = el._;
|
var _ = el._;
|
||||||
if (isWithoutTransform) {
|
if (isWithoutTransform) {
|
||||||
if (_.dirty || !_.bboxwt) {
|
_.bboxwt = Snap.path.get[el.type] ? Snap.path.getBBox(el.realPath = Snap.path.get[el.type](el)) : Snap._.box(el.node.getBBox());
|
||||||
el.realPath = Snap.path.get[el.type](el);
|
|
||||||
_.bboxwt = Snap.path.getBBox(el.realPath);
|
|
||||||
_.bboxwt.toString = x_y_w_h;
|
|
||||||
_.dirty = 0;
|
|
||||||
}
|
|
||||||
return Snap._.box(_.bboxwt);
|
return Snap._.box(_.bboxwt);
|
||||||
}
|
} else {
|
||||||
if (_.dirty || _.dirtyT || !_.bbox) {
|
el.realPath = (Snap.path.get[el.type] || Snap.path.get.deflt)(el);
|
||||||
if (_.dirty || !el.realPath) {
|
|
||||||
_.bboxwt = 0;
|
|
||||||
el.realPath = Snap.path.get[el.type](el);
|
|
||||||
}
|
|
||||||
_.bbox = Snap.path.getBBox(Snap.path.map(el.realPath, el.matrix));
|
_.bbox = Snap.path.getBBox(Snap.path.map(el.realPath, el.matrix));
|
||||||
_.bbox.toString = x_y_w_h;
|
|
||||||
_.dirty = _.dirtyT = 0;
|
|
||||||
}
|
}
|
||||||
return Snap._.box(_.bbox);
|
return Snap._.box(_.bbox);
|
||||||
};
|
};
|
||||||
|
@ -2292,16 +2280,24 @@ function arrayFirstValue(arr) {
|
||||||
\*/
|
\*/
|
||||||
Snap.parse = function (svg) {
|
Snap.parse = function (svg) {
|
||||||
var f = glob.doc.createDocumentFragment(),
|
var f = glob.doc.createDocumentFragment(),
|
||||||
div = glob.doc.createElement("div");
|
pointer = f;
|
||||||
svg = "<svg>" + svg + "</svg>";
|
eve.on("elemental.tag", function (data, extra, raw) {
|
||||||
div.innerHTML = svg;
|
var tag = $(data);
|
||||||
svg = div.getElementsByTagName("svg")[0];
|
extra && $(tag, extra);
|
||||||
if (svg) {
|
pointer.appendChild(tag);
|
||||||
while (svg.firstChild) {
|
pointer = tag;
|
||||||
f.appendChild(svg.firstChild);
|
});
|
||||||
}
|
eve.on("elemental.text", function (text) {
|
||||||
}
|
pointer.appendChild(glob.doc.createTextNode(text));
|
||||||
div.innerHTML = E;
|
});
|
||||||
|
eve.on("elemental./tag", function () {
|
||||||
|
pointer = pointer.parentNode;
|
||||||
|
});
|
||||||
|
eve.on("elemental.eof", function () {
|
||||||
|
eve.off("elemental.*");
|
||||||
|
eve("snap.parsed", f);
|
||||||
|
});
|
||||||
|
elemental().parse(svg).end();
|
||||||
return new Fragment(f);
|
return new Fragment(f);
|
||||||
};
|
};
|
||||||
function Fragment(frag) {
|
function Fragment(frag) {
|
||||||
|
|
Loading…
Reference in New Issue