Fix for bug #27
parent
74cd5600e3
commit
f384675b82
|
@ -126,9 +126,11 @@ console.log(el.attr("fill")); // #fc0
|
||||||
<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 2212 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2212">➭</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 2213 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2213">➭</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
|
<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
|
||||||
See also <a href="#Element.removeData" class="dr-link">Element.removeData</a>
|
with <code>data-</code> attributes)
|
||||||
|
</p>
|
||||||
|
<p>See also <a href="#Element.removeData" class="dr-link">Element.removeData</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">key</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">key</span>
|
||||||
<span class="dr-type"><em class="dr-type-string">string</em></span>
|
<span class="dr-type"><em class="dr-type-string">string</em></span>
|
||||||
|
@ -329,7 +331,7 @@ See also <a href="#Element.removeData" class="dr-link">Element.removeData</a>
|
||||||
<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 2261 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2261">➭</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 2262 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2262">➭</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>
|
||||||
|
@ -461,7 +463,7 @@ c.attr({
|
||||||
<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 2237 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2237">➭</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 2238 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2238">➭</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>
|
||||||
|
@ -495,7 +497,7 @@ If key is not provided, removes all the data of the element.
|
||||||
<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 2942 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2942">➭</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 2943 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2943">➭</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>
|
||||||
|
@ -660,10 +662,10 @@ If key is not provided, removes all the data of 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 <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 2331 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2331">➭</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 2332 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2332">➭</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 2338 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2338">➭</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 2339 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2339">➭</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>
|
||||||
|
@ -784,7 +786,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 2611 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2611">➭</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 2612 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2612">➭</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>
|
||||||
|
@ -800,7 +802,7 @@ 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.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 2551 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2551">➭</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 2552 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2552">➭</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>
|
||||||
|
@ -818,7 +820,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 2686 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2686">➭</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 2687 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2687">➭</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>
|
||||||
|
@ -852,7 +854,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 2762 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2762">➭</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 2763 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2763">➭</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>
|
||||||
|
@ -872,7 +874,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 2926 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2926">➭</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 2927 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2927">➭</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>
|
||||||
|
@ -915,10 +917,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 2768 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2768">➭</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 2769 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2769">➭</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 2643 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2643">➭</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 2644 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2644">➭</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>
|
||||||
|
@ -943,7 +945,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 2824 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2824">➭</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 2825 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2825">➭</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>
|
||||||
|
@ -962,7 +964,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 2731 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2731">➭</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 2732 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2732">➭</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>
|
||||||
|
@ -997,10 +999,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 2873 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2873">➭</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 2874 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2874">➭</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 2853 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2853">➭</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 2854 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2854">➭</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>
|
||||||
|
@ -1017,7 +1019,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 2574 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2574">➭</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 2575 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2575">➭</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>
|
||||||
|
@ -1048,7 +1050,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 2796 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2796">➭</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 2797 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2797">➭</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>
|
||||||
|
@ -1065,7 +1067,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 2942 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2942">➭</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 2943 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2943">➭</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>
|
||||||
|
@ -1151,7 +1153,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 2974 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2974">➭</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 2975 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2975">➭</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>
|
||||||
|
@ -1404,7 +1406,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 2349 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2349">➭</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 2350 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2350">➭</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>
|
||||||
|
@ -1522,7 +1524,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 3020 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L3020">➭</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 3021 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L3021">➭</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>
|
||||||
|
@ -1536,7 +1538,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 2300 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2300">➭</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 2301 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2301">➭</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>
|
||||||
|
@ -1563,7 +1565,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 1214 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1214">➭</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 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.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>
|
||||||
|
@ -1598,12 +1600,14 @@ Returns the bounding box of a given cubic beziér curve
|
||||||
<span class="dr-type"><em class="dr-type-array">array</em></span>
|
<span class="dr-type"><em class="dr-type-array">array</em></span>
|
||||||
<span class="dr-description">array of six points for beziér curve</span></li>
|
<span class="dr-description">array of six points for beziér curve</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">point information 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">bounding box</span></p>
|
||||||
<ol class="dr-json"><li>{<ol class="dr-json"><li> min: {<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate of the left point,</span>
|
<ol class="dr-json"><li>{<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate of the left top point of the box,</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 top point</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 left top point of the box,</span>
|
||||||
</ol></li><li> },</li><li> max: {<ol class="dr-json"><li><span class="dr-json-key">x:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate of the right point,</span>
|
<li><span class="dr-json-key">x2:</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">x coordinate of the right bottom point of the box,</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 bottom point</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 coordinate of the right bottom point of the box,</span>
|
||||||
</ol></li><li> }</li></ol></li><li>}</li></ol>
|
<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>
|
||||||
|
</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 1184 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1184">➭</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
|
||||||
|
@ -1649,7 +1653,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 1297 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1297">➭</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 1296 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1296">➭</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>
|
||||||
|
@ -1702,7 +1706,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 1263 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1263">➭</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 1261 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1261">➭</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>
|
||||||
|
@ -1723,7 +1727,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 1239 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1239">➭</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 1237 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1237">➭</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>
|
||||||
|
@ -1735,9 +1739,11 @@ 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 1278 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1278">➭</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 1277 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1277">➭</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>Note: fill mode doesn’t affect the result of this method.
|
||||||
</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>
|
||||||
<span class="dr-type"><em class="dr-type-string">string</em></span>
|
<span class="dr-type"><em class="dr-type-string">string</em></span>
|
||||||
|
@ -1750,7 +1756,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 1227 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1227">➭</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 1225 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1225">➭</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>
|
||||||
|
@ -1765,7 +1771,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 1341 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1341">➭</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 1340 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1340">➭</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>
|
||||||
|
@ -1776,7 +1782,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 1320 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1320">➭</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 1319 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1319">➭</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>
|
||||||
|
@ -1785,7 +1791,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 1331 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1331">➭</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 1330 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1330">➭</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>
|
||||||
|
@ -1794,7 +1800,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 1309 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1309">➭</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 1308 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/path.js#L1308">➭</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>
|
||||||
|
|
File diff suppressed because one or more lines are too long
|
@ -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-14
|
// build: 2013-10-15
|
||||||
// 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");
|
||||||
|
@ -1110,7 +1110,7 @@ var mina = (function (eve) {
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
var Snap = (function() {
|
var Snap = (function() {
|
||||||
Snap.version = "0.0.1";
|
Snap.version = "0.1.0";
|
||||||
// SIERRA: this method appears to be missing from HTML output
|
// SIERRA: this method appears to be missing from HTML output
|
||||||
/*\
|
/*\
|
||||||
* Snap
|
* Snap
|
||||||
|
@ -2454,7 +2454,7 @@ function unit2px(el, name, value) {
|
||||||
set("dy", getH);
|
set("dy", getH);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
out = null;
|
set(name, getW);
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
@ -3268,6 +3268,7 @@ function arrayFirstValue(arr) {
|
||||||
for (var key in keys) if (keys[has](key)) {
|
for (var key in keys) if (keys[has](key)) {
|
||||||
attr[key] = keys[key](val);
|
attr[key] = keys[key](val);
|
||||||
}
|
}
|
||||||
|
console.log(attr["stroke-dashoffset"]);
|
||||||
el.attr(attr);
|
el.attr(attr);
|
||||||
}, easing);
|
}, easing);
|
||||||
el.anims[anim.id] = anim;
|
el.anims[anim.id] = anim;
|
||||||
|
@ -3283,13 +3284,13 @@ function arrayFirstValue(arr) {
|
||||||
return el;
|
return el;
|
||||||
};
|
};
|
||||||
var eldata = {};
|
var eldata = {};
|
||||||
// SIERRA Element.data()/Element.removeData(): Do these correspond to _data- attributes, and if so, can you ordinarily use the the dataset API within SVG?
|
|
||||||
/*\
|
/*\
|
||||||
* Element.data
|
* Element.data
|
||||||
[ method ]
|
[ method ]
|
||||||
**
|
**
|
||||||
* Adds or retrieves given value associated with given key
|
* Adds or retrieves given value associated with given key. (Don’t confuse
|
||||||
**
|
* with `data-` attributes)
|
||||||
|
*
|
||||||
* See also @Element.removeData
|
* See also @Element.removeData
|
||||||
- key (string) key to store data
|
- key (string) key to store data
|
||||||
- value (any) #optional value to store
|
- value (any) #optional value to store
|
||||||
|
@ -4829,13 +4830,10 @@ eve.on("snap.util.getattr.path", function () {
|
||||||
eve.on("snap.util.getattr", function () {
|
eve.on("snap.util.getattr", function () {
|
||||||
var att = eve.nt();
|
var att = eve.nt();
|
||||||
att = att.substring(att.lastIndexOf(".") + 1);
|
att = att.substring(att.lastIndexOf(".") + 1);
|
||||||
var style = att.replace(/-(\w)/gi, function (all, letter) {
|
|
||||||
return letter.toUpperCase();
|
|
||||||
});
|
|
||||||
if (availableAttributes[has](this.type) && availableAttributes[this.type][has](att)) {
|
if (availableAttributes[has](this.type) && availableAttributes[this.type][has](att)) {
|
||||||
return this.node.getAttribute(att);
|
return this.node.getAttribute(att);
|
||||||
} else {
|
} else {
|
||||||
return glob.doc.defaultView.getComputedStyle(this.node, null).getPropertyValue(style);
|
return glob.doc.defaultView.getComputedStyle(this.node, null).getPropertyValue(att);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Snap.plugin = function (f) {
|
Snap.plugin = function (f) {
|
||||||
|
@ -6045,16 +6043,14 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
|
||||||
- p2y (number) y of the second point of the curve
|
- p2y (number) y of the second point of the curve
|
||||||
* or
|
* or
|
||||||
- bez (array) array of six points for beziér curve
|
- bez (array) array of six points for beziér curve
|
||||||
= (object) point information in format:
|
= (object) bounding box
|
||||||
o {
|
o {
|
||||||
o min: {
|
o x: (number) x coordinate of the left top point of the box,
|
||||||
o x: (number) x coordinate of the left point,
|
o y: (number) y coordinate of the left top point of the box,
|
||||||
o y: (number) y coordinate of the top point
|
o x2: (number) x coordinate of the right bottom point of the box,
|
||||||
o },
|
o y2: (number) y coordinate of the right bottom point of the box,
|
||||||
o max: {
|
o width: (number) width of the box,
|
||||||
o x: (number) x coordinate of the right point,
|
o height: (number) height of the box
|
||||||
o y: (number) y coordinate of the bottom point
|
|
||||||
o }
|
|
||||||
o }
|
o }
|
||||||
\*/
|
\*/
|
||||||
Snap.path.bezierBBox = bezierBBox;
|
Snap.path.bezierBBox = bezierBBox;
|
||||||
|
@ -6108,14 +6104,15 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
|
||||||
\*/
|
\*/
|
||||||
Snap.path.intersection = pathIntersection;
|
Snap.path.intersection = pathIntersection;
|
||||||
Snap.path.intersectionNumber = pathIntersectionNumber;
|
Snap.path.intersectionNumber = pathIntersectionNumber;
|
||||||
// SIERRA Does the fill mode affect how isPointInside behaves?
|
|
||||||
/*\
|
/*\
|
||||||
* Snap.path.isPointInside
|
* Snap.path.isPointInside
|
||||||
[ method ]
|
[ method ]
|
||||||
**
|
**
|
||||||
* Utility method
|
* Utility method
|
||||||
**
|
**
|
||||||
* Returns `true` if given point is inside a given closed path
|
* Returns `true` if given point is inside a given closed path.
|
||||||
|
*
|
||||||
|
* Note: fill mode doesn’t affect the result of this method.
|
||||||
- path (string) path string
|
- path (string) path string
|
||||||
- x (number) x of the point
|
- x (number) x of the point
|
||||||
- y (number) y of the point
|
- y (number) y of the point
|
||||||
|
|
13
src/svg.js
13
src/svg.js
|
@ -1357,7 +1357,7 @@ function unit2px(el, name, value) {
|
||||||
set("dy", getH);
|
set("dy", getH);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
out = null;
|
set(name, getW);
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
|
@ -2186,13 +2186,13 @@ function arrayFirstValue(arr) {
|
||||||
return el;
|
return el;
|
||||||
};
|
};
|
||||||
var eldata = {};
|
var eldata = {};
|
||||||
// SIERRA Element.data()/Element.removeData(): Do these correspond to _data- attributes, and if so, can you ordinarily use the the dataset API within SVG?
|
|
||||||
/*\
|
/*\
|
||||||
* Element.data
|
* Element.data
|
||||||
[ method ]
|
[ method ]
|
||||||
**
|
**
|
||||||
* Adds or retrieves given value associated with given key
|
* Adds or retrieves given value associated with given key. (Don’t confuse
|
||||||
**
|
* with `data-` attributes)
|
||||||
|
*
|
||||||
* See also @Element.removeData
|
* See also @Element.removeData
|
||||||
- key (string) key to store data
|
- key (string) key to store data
|
||||||
- value (any) #optional value to store
|
- value (any) #optional value to store
|
||||||
|
@ -3732,13 +3732,10 @@ eve.on("snap.util.getattr.path", function () {
|
||||||
eve.on("snap.util.getattr", function () {
|
eve.on("snap.util.getattr", function () {
|
||||||
var att = eve.nt();
|
var att = eve.nt();
|
||||||
att = att.substring(att.lastIndexOf(".") + 1);
|
att = att.substring(att.lastIndexOf(".") + 1);
|
||||||
var style = att.replace(/-(\w)/gi, function (all, letter) {
|
|
||||||
return letter.toUpperCase();
|
|
||||||
});
|
|
||||||
if (availableAttributes[has](this.type) && availableAttributes[this.type][has](att)) {
|
if (availableAttributes[has](this.type) && availableAttributes[this.type][has](att)) {
|
||||||
return this.node.getAttribute(att);
|
return this.node.getAttribute(att);
|
||||||
} else {
|
} else {
|
||||||
return glob.doc.defaultView.getComputedStyle(this.node, null).getPropertyValue(style);
|
return glob.doc.defaultView.getComputedStyle(this.node, null).getPropertyValue(att);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
Snap.plugin = function (f) {
|
Snap.plugin = function (f) {
|
||||||
|
|
Loading…
Reference in New Issue