Merge branch 'dev'
commit
8c67c8ceaa
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "Snap.svg",
|
"name": "Snap.svg",
|
||||||
"version": "0.5.0",
|
"version": "0.5.1",
|
||||||
"homepage": "http://snapsvg.io",
|
"homepage": "http://snapsvg.io",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Dmitry Baranovskiy <dmitry@baranovskiy.com>"
|
"Dmitry Baranovskiy <dmitry@baranovskiy.com>"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
"name": "Snap.svg",
|
"name": "Snap.svg",
|
||||||
"repo": "adobe-webplatform/Snap.svg",
|
"repo": "adobe-webplatform/Snap.svg",
|
||||||
"description": "The JavaScript library for modern SVG graphics.",
|
"description": "The JavaScript library for modern SVG graphics.",
|
||||||
"version": "0.5.0",
|
"version": "0.5.1",
|
||||||
"keywords": ["svg", "snap", "js", "javascript"],
|
"keywords": ["svg", "snap", "js", "javascript"],
|
||||||
"dependencies": {},
|
"dependencies": {},
|
||||||
"development": {},
|
"development": {},
|
||||||
|
|
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: 2017-02-05
|
// build: 2017-02-06
|
||||||
|
|
||||||
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
|
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
|
||||||
//
|
//
|
||||||
|
@ -868,7 +868,7 @@ var mina = (function (eve) {
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
var Snap = (function(root) {
|
var Snap = (function(root) {
|
||||||
Snap.version = "0.5.0";
|
Snap.version = "0.5.1";
|
||||||
/*\
|
/*\
|
||||||
* Snap
|
* Snap
|
||||||
[ method ]
|
[ method ]
|
||||||
|
@ -897,8 +897,12 @@ function Snap(w, h) {
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
if (h == null) {
|
if (h == null) {
|
||||||
|
// try {
|
||||||
w = glob.doc.querySelector(String(w));
|
w = glob.doc.querySelector(String(w));
|
||||||
return wrap(w);
|
return wrap(w);
|
||||||
|
// } catch (e) {
|
||||||
|
// return null;
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
w = w == null ? "100%" : w;
|
w = w == null ? "100%" : w;
|
||||||
|
@ -4120,7 +4124,8 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
|
||||||
= (string) unwrapped path
|
= (string) unwrapped path
|
||||||
\*/
|
\*/
|
||||||
Snap.deurl = function (value) {
|
Snap.deurl = function (value) {
|
||||||
return String(value).match(reURLValue)[2];
|
var res = String(value).match(reURLValue);
|
||||||
|
return res ? res[2] : value;
|
||||||
}
|
}
|
||||||
// Attributes event handlers
|
// Attributes event handlers
|
||||||
eve.on("snap.util.attr.mask", function (value) {
|
eve.on("snap.util.attr.mask", function (value) {
|
||||||
|
|
|
@ -1202,8 +1202,8 @@
|
||||||
<h2 class="dr-method">Snap.url(value)
|
<h2 class="dr-method">Snap.url(value)
|
||||||
<a href="#Snap.url" title="Link to this section"
|
<a href="#Snap.url" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 102 in the source"
|
<a class="dr-sourceline" title="Go to line 106 in the source"
|
||||||
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L102">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L106">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1236,8 +1236,8 @@
|
||||||
<h2 class="dr-method">Snap.format(token, json)
|
<h2 class="dr-method">Snap.format(token, json)
|
||||||
<a href="#Snap.format" title="Link to this section"
|
<a href="#Snap.format" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 207 in the source"
|
<a class="dr-sourceline" title="Go to line 211 in the source"
|
||||||
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L207">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L211">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1289,8 +1289,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.rad(deg)
|
<h2 class="dr-method">Snap.rad(deg)
|
||||||
<a href="#Snap.rad" title="Link to this section"
|
<a href="#Snap.rad" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 297 in the source"
|
<a class="dr-sourceline" title="Go to line 301 in the source"
|
||||||
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L297">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L301">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1323,8 +1323,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.deg(rad)
|
<h2 class="dr-method">Snap.deg(rad)
|
||||||
<a href="#Snap.deg" title="Link to this section"
|
<a href="#Snap.deg" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 306 in the source"
|
<a class="dr-sourceline" title="Go to line 310 in the source"
|
||||||
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L306">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L310">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1357,8 +1357,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.sin(angle)
|
<h2 class="dr-method">Snap.sin(angle)
|
||||||
<a href="#Snap.sin" title="Link to this section"
|
<a href="#Snap.sin" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 315 in the source"
|
<a class="dr-sourceline" title="Go to line 319 in the source"
|
||||||
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L315">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L319">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1392,8 +1392,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.tan(angle)
|
<h2 class="dr-method">Snap.tan(angle)
|
||||||
<a href="#Snap.tan" title="Link to this section"
|
<a href="#Snap.tan" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 326 in the source"
|
<a class="dr-sourceline" title="Go to line 330 in the source"
|
||||||
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L326">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L330">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1427,8 +1427,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.cos(angle)
|
<h2 class="dr-method">Snap.cos(angle)
|
||||||
<a href="#Snap.cos" title="Link to this section"
|
<a href="#Snap.cos" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 337 in the source"
|
<a class="dr-sourceline" title="Go to line 341 in the source"
|
||||||
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L337">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L341">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1462,8 +1462,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.asin(num)
|
<h2 class="dr-method">Snap.asin(num)
|
||||||
<a href="#Snap.asin" title="Link to this section"
|
<a href="#Snap.asin" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 348 in the source"
|
<a class="dr-sourceline" title="Go to line 352 in the source"
|
||||||
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L348">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L352">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1497,8 +1497,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.acos(num)
|
<h2 class="dr-method">Snap.acos(num)
|
||||||
<a href="#Snap.acos" title="Link to this section"
|
<a href="#Snap.acos" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 359 in the source"
|
<a class="dr-sourceline" title="Go to line 363 in the source"
|
||||||
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L359">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L363">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1532,8 +1532,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.atan(num)
|
<h2 class="dr-method">Snap.atan(num)
|
||||||
<a href="#Snap.atan" title="Link to this section"
|
<a href="#Snap.atan" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 370 in the source"
|
<a class="dr-sourceline" title="Go to line 374 in the source"
|
||||||
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L370">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L374">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1567,8 +1567,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.atan2(num)
|
<h2 class="dr-method">Snap.atan2(num)
|
||||||
<a href="#Snap.atan2" title="Link to this section"
|
<a href="#Snap.atan2" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 381 in the source"
|
<a class="dr-sourceline" title="Go to line 385 in the source"
|
||||||
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L381">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L385">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1602,8 +1602,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.angle(x1, y1, x2, y2, [x3], [y3])
|
<h2 class="dr-method">Snap.angle(x1, y1, x2, y2, [x3], [y3])
|
||||||
<a href="#Snap.angle"
|
<a href="#Snap.angle"
|
||||||
title="Link to this section" class="dr-hash">⚓</a>
|
title="Link to this section" class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 397 in the source"
|
<a class="dr-sourceline" title="Go to line 401 in the source"
|
||||||
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L397">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L401">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1671,8 +1671,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.len(x1, y1, x2, y2)
|
<h2 class="dr-method">Snap.len(x1, y1, x2, y2)
|
||||||
<a href="#Snap.len" title="Link to this section"
|
<a href="#Snap.len" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 409 in the source"
|
<a class="dr-sourceline" title="Go to line 413 in the source"
|
||||||
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L409">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L413">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1726,8 +1726,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.len2(x1, y1, x2, y2)
|
<h2 class="dr-method">Snap.len2(x1, y1, x2, y2)
|
||||||
<a href="#Snap.len2" title="Link to this section"
|
<a href="#Snap.len2" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 423 in the source"
|
<a class="dr-sourceline" title="Go to line 427 in the source"
|
||||||
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L423">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L427">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1781,8 +1781,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.closestPoint(path, x, y)
|
<h2 class="dr-method">Snap.closestPoint(path, x, y)
|
||||||
<a href="#Snap.closestPoint"
|
<a href="#Snap.closestPoint"
|
||||||
title="Link to this section" class="dr-hash">⚓</a>
|
title="Link to this section" class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 442 in the source"
|
<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#L442">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L446">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1829,8 +1829,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.is(o, type)
|
<h2 class="dr-method">Snap.is(o, type)
|
||||||
<a href="#Snap.is" title="Link to this section"
|
<a href="#Snap.is" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 504 in the source"
|
<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#L504">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L508">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1873,8 +1873,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.snapTo(values, value, [tolerance])
|
<h2 class="dr-method">Snap.snapTo(values, value, [tolerance])
|
||||||
<a href="#Snap.snapTo"
|
<a href="#Snap.snapTo"
|
||||||
title="Link to this section" class="dr-hash">⚓</a>
|
title="Link to this section" class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 515 in the source"
|
<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#L515">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L519">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -1925,8 +1925,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.getRGB(color)
|
<h2 class="dr-method">Snap.getRGB(color)
|
||||||
<a href="#Snap.getRGB" title="Link to this section"
|
<a href="#Snap.getRGB" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 568 in the source"
|
<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#L568">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L572">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2030,8 +2030,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.hsb(h, s, b)
|
<h2 class="dr-method">Snap.hsb(h, s, b)
|
||||||
<a href="#Snap.hsb" title="Link to this section"
|
<a href="#Snap.hsb" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 656 in the source"
|
<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#L656">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L660">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2079,8 +2079,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.hsl(h, s, l)
|
<h2 class="dr-method">Snap.hsl(h, s, l)
|
||||||
<a href="#Snap.hsl" title="Link to this section"
|
<a href="#Snap.hsl" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 669 in the source"
|
<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#L669">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L673">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2128,8 +2128,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.rgb(r, g, b)
|
<h2 class="dr-method">Snap.rgb(r, g, b)
|
||||||
<a href="#Snap.rgb" title="Link to this section"
|
<a href="#Snap.rgb" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 682 in the source"
|
<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#L682">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L686">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2177,8 +2177,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.color(clr)
|
<h2 class="dr-method">Snap.color(clr)
|
||||||
<a href="#Snap.color" title="Link to this section"
|
<a href="#Snap.color" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 768 in the source"
|
<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#L768">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L772">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2286,8 +2286,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.hsb2rgb(h, s, v)
|
<h2 class="dr-method">Snap.hsb2rgb(h, s, v)
|
||||||
<a href="#Snap.hsb2rgb" title="Link to this section"
|
<a href="#Snap.hsb2rgb" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 820 in the source"
|
<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#L820">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L824">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2369,8 +2369,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.hsl2rgb(h, s, l)
|
<h2 class="dr-method">Snap.hsl2rgb(h, s, l)
|
||||||
<a href="#Snap.hsl2rgb" title="Link to this section"
|
<a href="#Snap.hsl2rgb" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 856 in the source"
|
<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#L856">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L860">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2452,8 +2452,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.rgb2hsb(r, g, b)
|
<h2 class="dr-method">Snap.rgb2hsb(r, g, b)
|
||||||
<a href="#Snap.rgb2hsb" title="Link to this section"
|
<a href="#Snap.rgb2hsb" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 895 in the source"
|
<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#L895">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L899">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2528,8 +2528,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.rgb2hsl(r, g, b)
|
<h2 class="dr-method">Snap.rgb2hsl(r, g, b)
|
||||||
<a href="#Snap.rgb2hsl" title="Link to this section"
|
<a href="#Snap.rgb2hsl" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 927 in the source"
|
<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#L927">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L931">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2604,8 +2604,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.parsePathString(pathString)
|
<h2 class="dr-method">Snap.parsePathString(pathString)
|
||||||
<a href="#Snap.parsePathString"
|
<a href="#Snap.parsePathString"
|
||||||
title="Link to this section" class="dr-hash">⚓</a>
|
title="Link to this section" class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 960 in the source"
|
<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#L960">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L964">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2642,8 +2642,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.parseTransformString(TString)
|
<h2 class="dr-method">Snap.parseTransformString(TString)
|
||||||
<a href="#Snap.parseTransformString"
|
<a href="#Snap.parseTransformString"
|
||||||
title="Link to this section" class="dr-hash">⚓</a>
|
title="Link to this section" class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 1013 in the source"
|
<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#L1013">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1017">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2680,8 +2680,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.select(query)
|
<h2 class="dr-method">Snap.select(query)
|
||||||
<a href="#Snap.select" title="Link to this section"
|
<a href="#Snap.select" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 1273 in the source"
|
<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#L1273">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1277">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2715,8 +2715,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-method">Snap.selectAll(query)
|
<h2 class="dr-method">Snap.selectAll(query)
|
||||||
<a href="#Snap.selectAll" title="Link to this section"
|
<a href="#Snap.selectAll" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 1285 in the source"
|
<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#L1285">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1289">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2751,8 +2751,8 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
|
||||||
<h2 class="dr-property">Element.node()
|
<h2 class="dr-property">Element.node()
|
||||||
<a href="#Element.node" title="Link to this section"
|
<a href="#Element.node" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 1347 in the source"
|
<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#L1347">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1351">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2775,8 +2775,8 @@ c.node.onclick = function () {
|
||||||
<h2 class="dr-property">Element.type()
|
<h2 class="dr-property">Element.type()
|
||||||
<a href="#Element.type" title="Link to this section"
|
<a href="#Element.type" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 1357 in the source"
|
<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#L1357">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1361">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2792,8 +2792,8 @@ c.node.onclick = function () {
|
||||||
<h2 class="dr-method">Element.attr(…)
|
<h2 class="dr-method">Element.attr(…)
|
||||||
<a href="#Element.attr" title="Link to this section"
|
<a href="#Element.attr" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 1399 in the source"
|
<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#L1399">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1403">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2862,8 +2862,8 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
|
||||||
<h2 class="dr-method">Snap.parse(svg)
|
<h2 class="dr-method">Snap.parse(svg)
|
||||||
<a href="#Snap.parse" title="Link to this section"
|
<a href="#Snap.parse" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 1440 in the source"
|
<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#L1440">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1444">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2900,8 +2900,8 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
|
||||||
<h2 class="dr-method">Snap.fragment(varargs)
|
<h2 class="dr-method">Snap.fragment(varargs)
|
||||||
<a href="#Snap.fragment" title="Link to this section"
|
<a href="#Snap.fragment" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 1474 in the source"
|
<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#L1474">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1478">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2937,8 +2937,8 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
|
||||||
<h2 class="dr-method">Paper.el(name, attr)
|
<h2 class="dr-method">Paper.el(name, attr)
|
||||||
<a href="#Paper.el" title="Link to this section"
|
<a href="#Paper.el" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 1577 in the source"
|
<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#L1577">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1581">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -2992,8 +2992,8 @@ var c = paper.el("circle", {
|
||||||
<h2 class="dr-method">Element.children()
|
<h2 class="dr-method">Element.children()
|
||||||
<a href="#Element.children" title="Link to this section"
|
<a href="#Element.children" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 1589 in the source"
|
<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#L1589">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1593">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -3014,8 +3014,8 @@ var c = paper.el("circle", {
|
||||||
<h2 class="dr-method">Element.toJSON()
|
<h2 class="dr-method">Element.toJSON()
|
||||||
<a href="#Element.toJSON" title="Link to this section"
|
<a href="#Element.toJSON" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 1622 in the source"
|
<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#L1622">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1626">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -3066,8 +3066,8 @@ var c = paper.el("circle", {
|
||||||
<h2 class="dr-method">Snap.ajax(…)
|
<h2 class="dr-method">Snap.ajax(…)
|
||||||
<a href="#Snap.ajax" title="Link to this section"
|
<a href="#Snap.ajax" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 1740 in the source"
|
<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#L1740">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1744">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -3150,8 +3150,8 @@ var c = paper.el("circle", {
|
||||||
<h2 class="dr-method">Snap.load(url, callback, [scope])
|
<h2 class="dr-method">Snap.load(url, callback, [scope])
|
||||||
<a href="#Snap.load"
|
<a href="#Snap.load"
|
||||||
title="Link to this section" class="dr-hash">⚓</a>
|
title="Link to this section" class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 1786 in the source"
|
<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#L1786">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1790">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -3196,8 +3196,8 @@ var c = paper.el("circle", {
|
||||||
<h2 class="dr-method">Snap.getElementByPoint(x, y)
|
<h2 class="dr-method">Snap.getElementByPoint(x, y)
|
||||||
<a href="#Snap.getElementByPoint"
|
<a href="#Snap.getElementByPoint"
|
||||||
title="Link to this section" class="dr-hash">⚓</a>
|
title="Link to this section" class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 1817 in the source"
|
<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#L1817">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1821">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
@ -3241,8 +3241,8 @@ var c = paper.el("circle", {
|
||||||
<h2 class="dr-method">Snap.plugin(f)
|
<h2 class="dr-method">Snap.plugin(f)
|
||||||
<a href="#Snap.plugin" title="Link to this section"
|
<a href="#Snap.plugin" title="Link to this section"
|
||||||
class="dr-hash">⚓</a>
|
class="dr-hash">⚓</a>
|
||||||
<a class="dr-sourceline" title="Go to line 1852 in the source"
|
<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#L1852">➭</a>
|
href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1856">➭</a>
|
||||||
</h2>
|
</h2>
|
||||||
</header>
|
</header>
|
||||||
<section>
|
<section>
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
|
#0.5.1
|
||||||
|
|
||||||
|
* Bug fix
|
||||||
|
|
||||||
#0.5.0
|
#0.5.0
|
||||||
|
|
||||||
* Added color palettes for Material and FlatUI
|
* Added color palettes for Material and FlatUI
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "snapsvg",
|
"name": "snapsvg",
|
||||||
"version": "0.5.0",
|
"version": "0.5.1",
|
||||||
"description": "JavaScript Vector Library",
|
"description": "JavaScript Vector Library",
|
||||||
"main": "./dist/snap.svg.js",
|
"main": "./dist/snap.svg.js",
|
||||||
"repository": {
|
"repository": {
|
||||||
|
|
|
@ -32,7 +32,8 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
|
||||||
= (string) unwrapped path
|
= (string) unwrapped path
|
||||||
\*/
|
\*/
|
||||||
Snap.deurl = function (value) {
|
Snap.deurl = function (value) {
|
||||||
return String(value).match(reURLValue)[2];
|
var res = String(value).match(reURLValue);
|
||||||
|
return res ? res[2] : value;
|
||||||
}
|
}
|
||||||
// Attributes event handlers
|
// Attributes event handlers
|
||||||
eve.on("snap.util.attr.mask", function (value) {
|
eve.on("snap.util.attr.mask", function (value) {
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
// limitations under the License.
|
// limitations under the License.
|
||||||
|
|
||||||
var Snap = (function(root) {
|
var Snap = (function(root) {
|
||||||
Snap.version = "0.5.0";
|
Snap.version = "0.5.1";
|
||||||
/*\
|
/*\
|
||||||
* Snap
|
* Snap
|
||||||
[ method ]
|
[ method ]
|
||||||
|
@ -42,8 +42,12 @@ function Snap(w, h) {
|
||||||
return w;
|
return w;
|
||||||
}
|
}
|
||||||
if (h == null) {
|
if (h == null) {
|
||||||
|
try {
|
||||||
w = glob.doc.querySelector(String(w));
|
w = glob.doc.querySelector(String(w));
|
||||||
return wrap(w);
|
return wrap(w);
|
||||||
|
} catch (e) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
w = w == null ? "100%" : w;
|
w = w == null ? "100%" : w;
|
||||||
|
|
|
@ -13,6 +13,7 @@ describe("Attributes", function () {
|
||||||
o[key] = "#fc0";
|
o[key] = "#fc0";
|
||||||
r.attr(o);
|
r.attr(o);
|
||||||
expect(r.node.getAttribute(key)).to.be("#ffcc00");
|
expect(r.node.getAttribute(key)).to.be("#ffcc00");
|
||||||
|
expect(r.attr(key)).to.be("rgb(255, 204, 0)");
|
||||||
o[key] = "rgb(255, 204, 0)";
|
o[key] = "rgb(255, 204, 0)";
|
||||||
r.attr(o);
|
r.attr(o);
|
||||||
expect(r.node.getAttribute(key)).to.be("#ffcc00");
|
expect(r.node.getAttribute(key)).to.be("#ffcc00");
|
||||||
|
|
Loading…
Reference in New Issue