Fixes left out `URL` call.

Fixes #390. Slightly better duplicate of #501.
master
Dmitry Baranovskiy 2017-02-01 10:47:28 +11:00
parent 7abe4d149f
commit 768ddb1b77
6 changed files with 128 additions and 70 deletions

File diff suppressed because one or more lines are too long

23
dist/snap.svg.js vendored
View File

@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
// build: 2017-01-24
// build: 2017-02-01
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
//
@ -934,6 +934,14 @@ var has = "hasOwnProperty",
xlink = "http://www.w3.org/1999/xlink",
xmlns = "http://www.w3.org/2000/svg",
hub = {},
/*\
* Snap.url()
[ method ]
**
* Wraps path into `"url('<path>')"`.
- value (string) path
= (string) wrapped path
\*/
URL = Snap.url = function (url) {
return "url('#" + url + "')";
};
@ -3187,7 +3195,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
if (val) {
uses[val] = (uses[val] || []).concat(function (id) {
var attr = {};
attr[name] = URL(id);
attr[name] = Snap.url(id);
$(it.node, attr);
});
}
@ -4095,17 +4103,6 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
Str = String,
separator = Snap._.separator,
E = "";
/*\
* Snap.url()
[ method ]
**
* Wraps path into `"url(<path>)"`.
- value (string) path
= (string) wrapped path
\*/
Snap.url = function (value) {
return "url(" + value + ")";
}
/*\
* Snap.deurl()
[ method ]

View File

@ -827,6 +827,10 @@
<a href="#Snap.tan" class="dr-method"><span>Snap.tan()</span></a>
</li>
<li class="dr-lvl1">
<a href="#Snap.url()" class="dr-method"><span>Snap.url()()</span></a>
</li>
<li class="dr-lvl0">
<a href="#mina" class="dr-method"><span>mina()</span></a>
</li>
@ -1024,13 +1028,73 @@
</div>
</section>
</article>
<article id="Snap.url()">
<header>
<h3 class="dr-method">Snap.url()(value)<a href="#Snap.url()" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 102 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L102">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.url()-extra"></div>
<div class="dr-method">
<p>Wraps path into <code>&quot;url(&#39;&lt;path&gt;&#39;)&quot;</code>.
</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">value</span>
<span class="dr-type"><em class="dr-type-string">string</em> </span>
<span class="dr-description">path</span></li>
</ol>
</div>
<p class="dr-returns">
<strong class="dr-title">Returns:</strong>
<em class="dr-type-string">string</em>
<span class="dr-description">wrapped path</span>
</p>
</div>
</section>
</article>
<article id="Snap.format">
<header>
<h3 class="dr-method">Snap.format(token, json)<a href="#Snap.format" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 199 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L199">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.format(token, json)<a href="#Snap.format" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 207 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L207">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.format-extra"></div>
@ -1124,7 +1188,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.rad">
<header>
<h3 class="dr-method">Snap.rad(deg)<a href="#Snap.rad" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 289 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L289">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.rad(deg)<a href="#Snap.rad" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 297 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L297">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.rad-extra"></div>
@ -1184,7 +1248,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.deg">
<header>
<h3 class="dr-method">Snap.deg(rad)<a href="#Snap.deg" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 298 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L298">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.deg(rad)<a href="#Snap.deg" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 306 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L306">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.deg-extra"></div>
@ -1244,7 +1308,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.sin">
<header>
<h3 class="dr-method">Snap.sin(angle)<a href="#Snap.sin" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 307 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L307">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.sin(angle)<a href="#Snap.sin" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 315 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L315">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.sin-extra"></div>
@ -1304,7 +1368,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.tan">
<header>
<h3 class="dr-method">Snap.tan(angle)<a href="#Snap.tan" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 318 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L318">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.tan(angle)<a href="#Snap.tan" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 326 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L326">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.tan-extra"></div>
@ -1364,7 +1428,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.cos">
<header>
<h3 class="dr-method">Snap.cos(angle)<a href="#Snap.cos" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 329 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L329">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.cos(angle)<a href="#Snap.cos" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 337 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L337">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.cos-extra"></div>
@ -1424,7 +1488,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.asin">
<header>
<h3 class="dr-method">Snap.asin(num)<a href="#Snap.asin" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 340 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L340">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.asin(num)<a href="#Snap.asin" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 348 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L348">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.asin-extra"></div>
@ -1484,7 +1548,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.acos">
<header>
<h3 class="dr-method">Snap.acos(num)<a href="#Snap.acos" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 351 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L351">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.acos(num)<a href="#Snap.acos" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 359 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L359">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.acos-extra"></div>
@ -1544,7 +1608,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.atan">
<header>
<h3 class="dr-method">Snap.atan(num)<a href="#Snap.atan" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 362 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L362">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.atan(num)<a href="#Snap.atan" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 370 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L370">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.atan-extra"></div>
@ -1604,7 +1668,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.atan2">
<header>
<h3 class="dr-method">Snap.atan2(num)<a href="#Snap.atan2" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 373 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L373">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.atan2(num)<a href="#Snap.atan2" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 381 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L381">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.atan2-extra"></div>
@ -1664,7 +1728,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.angle">
<header>
<h3 class="dr-method">Snap.angle(x1, y1, x2, y2, [x3], [y3])<a href="#Snap.angle" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 390 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L390">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.angle(x1, y1, x2, y2, [x3], [y3])<a href="#Snap.angle" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 398 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L398">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.angle-extra"></div>
@ -1750,7 +1814,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.len">
<header>
<h3 class="dr-method">Snap.len(x1, y1, x2, y2)<a href="#Snap.len" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 403 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L403">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.len(x1, y1, x2, y2)<a href="#Snap.len" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 411 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L411">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.len-extra"></div>
@ -1830,7 +1894,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.len2">
<header>
<h3 class="dr-method">Snap.len2(x1, y1, x2, y2)<a href="#Snap.len2" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 418 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L418">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.len2(x1, y1, x2, y2)<a href="#Snap.len2" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 426 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L426">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.len2-extra"></div>
@ -1910,7 +1974,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.closestPoint">
<header>
<h3 class="dr-method">Snap.closestPoint(path, x, y)<a href="#Snap.closestPoint" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 438 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L438">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.closestPoint(path, x, y)<a href="#Snap.closestPoint" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 446 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L446">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.closestPoint-extra"></div>
@ -1987,7 +2051,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.is">
<header>
<h3 class="dr-method">Snap.is(o, type)<a href="#Snap.is" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 500 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L500">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.is(o, type)<a href="#Snap.is" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 508 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L508">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.is-extra"></div>
@ -2050,7 +2114,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.snapTo">
<header>
<h3 class="dr-method">Snap.snapTo(values, value, [tolerance])<a href="#Snap.snapTo" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 511 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L511">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.snapTo(values, value, [tolerance])<a href="#Snap.snapTo" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 519 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L519">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.snapTo-extra"></div>
@ -2116,7 +2180,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.getRGB">
<header>
<h3 class="dr-method">Snap.getRGB(color)<a href="#Snap.getRGB" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 564 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L564">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.getRGB(color)<a href="#Snap.getRGB" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 572 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L572">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.getRGB-extra"></div>
@ -2451,7 +2515,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.hsb">
<header>
<h3 class="dr-method">Snap.hsb(h, s, b)<a href="#Snap.hsb" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 652 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L652">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.hsb(h, s, b)<a href="#Snap.hsb" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 660 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L660">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.hsb-extra"></div>
@ -2517,7 +2581,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.hsl">
<header>
<h3 class="dr-method">Snap.hsl(h, s, l)<a href="#Snap.hsl" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 665 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L665">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.hsl(h, s, l)<a href="#Snap.hsl" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 673 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L673">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.hsl-extra"></div>
@ -2583,7 +2647,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.rgb">
<header>
<h3 class="dr-method">Snap.rgb(r, g, b)<a href="#Snap.rgb" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 678 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L678">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.rgb(r, g, b)<a href="#Snap.rgb" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 686 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L686">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.rgb-extra"></div>
@ -2649,7 +2713,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.color">
<header>
<h3 class="dr-method">Snap.color(clr)<a href="#Snap.color" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 764 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L764">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.color(clr)<a href="#Snap.color" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 772 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L772">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.color-extra"></div>
@ -2801,7 +2865,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.hsb2rgb">
<header>
<h3 class="dr-method">Snap.hsb2rgb(h, s, v)<a href="#Snap.hsb2rgb" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 816 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L816">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.hsb2rgb(h, s, v)<a href="#Snap.hsb2rgb" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 824 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L824">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.hsb2rgb-extra"></div>
@ -2919,7 +2983,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.hsl2rgb">
<header>
<h3 class="dr-method">Snap.hsl2rgb(h, s, l)<a href="#Snap.hsl2rgb" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 852 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L852">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.hsl2rgb(h, s, l)<a href="#Snap.hsl2rgb" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 860 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L860">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.hsl2rgb-extra"></div>
@ -3037,7 +3101,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.rgb2hsb">
<header>
<h3 class="dr-method">Snap.rgb2hsb(r, g, b)<a href="#Snap.rgb2hsb" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 891 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L891">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.rgb2hsb(r, g, b)<a href="#Snap.rgb2hsb" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 899 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L899">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.rgb2hsb-extra"></div>
@ -3147,7 +3211,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.rgb2hsl">
<header>
<h3 class="dr-method">Snap.rgb2hsl(r, g, b)<a href="#Snap.rgb2hsl" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 923 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L923">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.rgb2hsl(r, g, b)<a href="#Snap.rgb2hsl" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 931 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L931">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.rgb2hsl-extra"></div>
@ -3257,7 +3321,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.parsePathString">
<header>
<h3 class="dr-method">Snap.parsePathString(pathString)<a href="#Snap.parsePathString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 956 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L956">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.parsePathString(pathString)<a href="#Snap.parsePathString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 964 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L964">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.parsePathString-extra"></div>
@ -3318,7 +3382,7 @@ Parses given path string into an array of arrays of path segments
<article id="Snap.parseTransformString">
<header>
<h3 class="dr-method">Snap.parseTransformString(TString)<a href="#Snap.parseTransformString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1009 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1009">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.parseTransformString(TString)<a href="#Snap.parseTransformString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1017 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1017">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.parseTransformString-extra"></div>
@ -3379,7 +3443,7 @@ Parses given transform string into an array of transformations
<article id="Snap.select">
<header>
<h3 class="dr-method">Snap.select(query)<a href="#Snap.select" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1269 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1269">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.select(query)<a href="#Snap.select" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1277 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1277">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.select-extra"></div>
@ -3439,7 +3503,7 @@ Parses given transform string into an array of transformations
<article id="Snap.selectAll">
<header>
<h3 class="dr-method">Snap.selectAll(query)<a href="#Snap.selectAll" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1281 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1281">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.selectAll(query)<a href="#Snap.selectAll" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1289 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1289">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.selectAll-extra"></div>
@ -3499,7 +3563,7 @@ Parses given transform string into an array of transformations
<article id="Element.node">
<header>
<h3 class="dr-property">Element.node()<a href="#Element.node" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1343 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1343">&#x27ad;</a></h3>
<h3 class="dr-property">Element.node()<a href="#Element.node" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1351 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1351">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.node-extra"></div>
@ -3550,7 +3614,7 @@ c.node.onclick = function () {
<article id="Element.type">
<header>
<h3 class="dr-property">Element.type()<a href="#Element.type" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1353 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1353">&#x27ad;</a></h3>
<h3 class="dr-property">Element.type()<a href="#Element.type" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1361 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1361">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.type-extra"></div>
@ -3575,7 +3639,7 @@ c.node.onclick = function () {
<article id="Element.attr">
<header>
<h3 class="dr-method">Element.attr(…)<a href="#Element.attr" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1395 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1395">&#x27ad;</a></h3>
<h3 class="dr-method">Element.attr(…)<a href="#Element.attr" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1403 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1403">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.attr-extra"></div>
@ -3734,7 +3798,7 @@ and <code>-</code>: <code>&quot;+=2em&quot;</code>.
<article id="Snap.parse">
<header>
<h3 class="dr-method">Snap.parse(svg)<a href="#Snap.parse" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1436 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1436">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.parse(svg)<a href="#Snap.parse" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1444 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1444">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.parse-extra"></div>
@ -3794,7 +3858,7 @@ and <code>-</code>: <code>&quot;+=2em&quot;</code>.
<article id="Snap.fragment">
<header>
<h3 class="dr-method">Snap.fragment(varargs)<a href="#Snap.fragment" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1470 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1470">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.fragment(varargs)<a href="#Snap.fragment" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1478 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1478">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.fragment-extra"></div>
@ -3854,7 +3918,7 @@ and <code>-</code>: <code>&quot;+=2em&quot;</code>.
<article id="Paper.el">
<header>
<h3 class="dr-method">Paper.el(name, attr)<a href="#Paper.el" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1573 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1573">&#x27ad;</a></h3>
<h3 class="dr-method">Paper.el(name, attr)<a href="#Paper.el" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1581 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1581">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Paper.el-extra"></div>
@ -3950,7 +4014,7 @@ var c = paper.el("circle", {
<article id="Element.children">
<header>
<h3 class="dr-method">Element.children()<a href="#Element.children" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1585 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1585">&#x27ad;</a></h3>
<h3 class="dr-method">Element.children()<a href="#Element.children" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1593 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1593">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.children-extra"></div>
@ -3992,7 +4056,7 @@ var c = paper.el("circle", {
<article id="Element.toJSON">
<header>
<h3 class="dr-method">Element.toJSON()<a href="#Element.toJSON" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1618 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1618">&#x27ad;</a></h3>
<h3 class="dr-method">Element.toJSON()<a href="#Element.toJSON" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1626 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1626">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.toJSON-extra"></div>
@ -4078,7 +4142,7 @@ var c = paper.el("circle", {
<article id="Snap.ajax">
<header>
<h3 class="dr-method">Snap.ajax(…)<a href="#Snap.ajax" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1736 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1736">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.ajax(…)<a href="#Snap.ajax" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1744 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1744">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.ajax-extra"></div>
@ -4182,7 +4246,7 @@ var c = paper.el("circle", {
<article id="Snap.load">
<header>
<h3 class="dr-method">Snap.load(url, callback, [scope])<a href="#Snap.load" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1782 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1782">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.load(url, callback, [scope])<a href="#Snap.load" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1790 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1790">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.load-extra"></div>
@ -4231,7 +4295,7 @@ var c = paper.el("circle", {
<article id="Snap.getElementByPoint">
<header>
<h3 class="dr-method">Snap.getElementByPoint(x, y)<a href="#Snap.getElementByPoint" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1813 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1813">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.getElementByPoint(x, y)<a href="#Snap.getElementByPoint" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1821 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1821">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.getElementByPoint-extra"></div>
@ -4316,7 +4380,7 @@ var c = paper.el("circle", {
<article id="Snap.plugin">
<header>
<h3 class="dr-method">Snap.plugin(f)<a href="#Snap.plugin" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1848 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1848">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.plugin(f)<a href="#Snap.plugin" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1856 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1856">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.plugin-extra"></div>

View File

@ -23,17 +23,6 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
Str = String,
separator = Snap._.separator,
E = "";
/*\
* Snap.url()
[ method ]
**
* Wraps path into `"url(<path>)"`.
- value (string) path
= (string) wrapped path
\*/
Snap.url = function (value) {
return "url(" + value + ")";
}
/*\
* Snap.deurl()
[ method ]

View File

@ -490,7 +490,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
if (val) {
uses[val] = (uses[val] || []).concat(function (id) {
var attr = {};
attr[name] = URL(id);
attr[name] = Snap.url(id);
$(it.node, attr);
});
}

View File

@ -91,6 +91,14 @@ var has = "hasOwnProperty",
xlink = "http://www.w3.org/1999/xlink",
xmlns = "http://www.w3.org/2000/svg",
hub = {},
/*\
* Snap.url()
[ method ]
**
* Wraps path into `"url('<path>')"`.
- value (string) path
= (string) wrapped path
\*/
URL = Snap.url = function (url) {
return "url('#" + url + "')";
};