Merge of 0.4.1

master
Dmitry Baranovskiy 2015-04-13 16:22:59 +10:00
commit de1f20748b
7 changed files with 52 additions and 50 deletions

18
dist/snap.svg-min.js vendored

File diff suppressed because one or more lines are too long

21
dist/snap.svg.js vendored
View File

@ -1,20 +1,20 @@
// Snap.svg 0.4.0
//
// Snap.svg 0.4.1
//
// Copyright (c) 2013 2015 Adobe Systems Incorporated. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
// build: 2015-04-07
//
// build: 2015-04-13
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
//
@ -2750,7 +2750,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
if (!Snap._.rgTransform.test(tstr)) {
tstr = Snap._.svgTransform2string(tstr);
} else {
tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || E);
tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || "");
}
if (is(tstr, "array")) {
tstr = Snap.path ? Snap.path.toString.call(tstr) : Str(tstr);
@ -3050,7 +3050,6 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
= (Element) result of query selection
\*/
elproto.select = function (query) {
query = Str(query).replace(/([^\\]):/g, "$1\\:");
return wrap(this.node.querySelector(query));
};
/*\
@ -3444,7 +3443,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
if (attrs instanceof Animation) {
callback = attrs.callback;
easing = attrs.easing;
ms = easing.dur;
ms = attrs.dur;
attrs = attrs.attr;
}
var fkeys = [], tkeys = [], keys = {}, from, to, f, eq,
@ -8168,4 +8167,4 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
});
return Snap;
}));
}));

View File

@ -5341,7 +5341,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.selectAll">
<header>
<h3 class="dr-method">Element.selectAll(query)<a href="#Element.selectAll" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 419 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L419">&#x27ad;</a></h3>
<h3 class="dr-method">Element.selectAll(query)<a href="#Element.selectAll" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 418 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L418">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.selectAll-extra"></div>
@ -5403,7 +5403,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.asPX">
<header>
<h3 class="dr-method">Element.asPX(attr, [value])<a href="#Element.asPX" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 437 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L437">&#x27ad;</a></h3>
<h3 class="dr-method">Element.asPX(attr, [value])<a href="#Element.asPX" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 436 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L436">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.asPX-extra"></div>
@ -5466,7 +5466,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.use">
<header>
<h3 class="dr-method">Element.use()<a href="#Element.use" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 452 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L452">&#x27ad;</a></h3>
<h3 class="dr-method">Element.use()<a href="#Element.use" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 451 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L451">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.use-extra"></div>
@ -5508,7 +5508,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.clone">
<header>
<h3 class="dr-method">Element.clone()<a href="#Element.clone" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 543 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L543">&#x27ad;</a></h3>
<h3 class="dr-method">Element.clone()<a href="#Element.clone" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 542 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L542">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.clone-extra"></div>
@ -5550,7 +5550,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.toDefs">
<header>
<h3 class="dr-method">Element.toDefs()<a href="#Element.toDefs" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 560 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L560">&#x27ad;</a></h3>
<h3 class="dr-method">Element.toDefs()<a href="#Element.toDefs" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 559 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L559">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.toDefs-extra"></div>
@ -5592,7 +5592,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.toPattern">
<header>
<h3 class="dr-method">Element.toPattern(x, y, width, height)<a href="#Element.toPattern" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 588 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L588">&#x27ad;</a></h3>
<h3 class="dr-method">Element.toPattern(x, y, width, height)<a href="#Element.toPattern" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 587 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L587">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.toPattern-extra"></div>
@ -5692,7 +5692,7 @@ c.attr({
<article id="Element.marker">
<header>
<h3 class="dr-method">Element.marker(x, y, width, height, refX, refY)<a href="#Element.marker" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 629 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L629">&#x27ad;</a></h3>
<h3 class="dr-method">Element.marker(x, y, width, height, refX, refY)<a href="#Element.marker" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 628 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L628">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.marker-extra"></div>
@ -5779,7 +5779,7 @@ To create a marker you have to specify the bounding rect and reference point:
<article id="Snap.animation">
<header>
<h3 class="dr-method">Snap.animation(attr, duration, [easing], [callback])<a href="#Snap.animation" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 688 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L688">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.animation(attr, duration, [easing], [callback])<a href="#Snap.animation" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 687 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L687">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.animation-extra"></div>
@ -5848,7 +5848,7 @@ To create a marker you have to specify the bounding rect and reference point:
<article id="Element.inAnim">
<header>
<h3 class="dr-method">Element.inAnim()<a href="#Element.inAnim" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 706 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L706">&#x27ad;</a></h3>
<h3 class="dr-method">Element.inAnim()<a href="#Element.inAnim" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 705 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L705">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.inAnim-extra"></div>
@ -5950,7 +5950,7 @@ To create a marker you have to specify the bounding rect and reference point:
<article id="Snap.animate">
<header>
<h3 class="dr-method">Snap.animate(from, to, setter, duration, [easing], [callback])<a href="#Snap.animate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 756 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L756">&#x27ad;</a></h3>
<h3 class="dr-method">Snap.animate(from, to, setter, duration, [easing], [callback])<a href="#Snap.animate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 755 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L755">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Snap.animate-extra"></div>
@ -6111,7 +6111,7 @@ rect.animate({x: 10}, 1000);</code></pre></section>
<article id="Element.stop">
<header>
<h3 class="dr-method">Element.stop()<a href="#Element.stop" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 774 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L774">&#x27ad;</a></h3>
<h3 class="dr-method">Element.stop()<a href="#Element.stop" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 773 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L773">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.stop-extra"></div>
@ -6153,7 +6153,7 @@ rect.animate({x: 10}, 1000);</code></pre></section>
<article id="Element.animate">
<header>
<h3 class="dr-method">Element.animate(attrs, duration, [easing], [callback])<a href="#Element.animate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 793 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L793">&#x27ad;</a></h3>
<h3 class="dr-method">Element.animate(attrs, duration, [easing], [callback])<a href="#Element.animate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 792 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L792">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.animate-extra"></div>
@ -6222,7 +6222,7 @@ rect.animate({x: 10}, 1000);</code></pre></section>
<article id="Element.data">
<header>
<h3 class="dr-method">Element.data(key, [value])<a href="#Element.data" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 866 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L866">&#x27ad;</a></h3>
<h3 class="dr-method">Element.data(key, [value])<a href="#Element.data" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 865 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L865">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.data-extra"></div>
@ -6344,7 +6344,7 @@ with <code>data-</code> attributes)
<article id="Element.removeData">
<header>
<h3 class="dr-method">Element.removeData([key])<a href="#Element.removeData" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 895 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L895">&#x27ad;</a></h3>
<h3 class="dr-method">Element.removeData([key])<a href="#Element.removeData" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 894 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L894">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.removeData-extra"></div>
@ -6405,7 +6405,7 @@ If key is not provided, removes all the data of the element.
<article id="Element.outerSVG">
<header>
<h3 class="dr-method">Element.outerSVG()<a href="#Element.outerSVG" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 912 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L912">&#x27ad;</a></h3>
<h3 class="dr-method">Element.outerSVG()<a href="#Element.outerSVG" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 911 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L911">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.outerSVG-extra"></div>
@ -6448,7 +6448,7 @@ If key is not provided, removes all the data of the element.
<article id="Element.toString">
<header>
<h3 class="dr-method">Element.toString()<a href="#Element.toString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 918 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L918">&#x27ad;</a></h3>
<h3 class="dr-method">Element.toString()<a href="#Element.toString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 917 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L917">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.toString-extra"></div>
@ -6473,7 +6473,7 @@ If key is not provided, removes all the data of the element.
<article id="Element.innerSVG">
<header>
<h3 class="dr-method">Element.innerSVG()<a href="#Element.innerSVG" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 926 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L926">&#x27ad;</a></h3>
<h3 class="dr-method">Element.innerSVG()<a href="#Element.innerSVG" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 925 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L925">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Element.innerSVG-extra"></div>
@ -6515,7 +6515,7 @@ If key is not provided, removes all the data of the element.
<article id="Fragment.select">
<header>
<h3 class="dr-method">Fragment.select()<a href="#Fragment.select" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 973 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L973">&#x27ad;</a></h3>
<h3 class="dr-method">Fragment.select()<a href="#Fragment.select" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 972 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L972">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Fragment.select-extra"></div>
@ -6540,7 +6540,7 @@ If key is not provided, removes all the data of the element.
<article id="Fragment.selectAll">
<header>
<h3 class="dr-method">Fragment.selectAll()<a href="#Fragment.selectAll" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 980 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L980">&#x27ad;</a></h3>
<h3 class="dr-method">Fragment.selectAll()<a href="#Fragment.selectAll" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 979 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L979">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Fragment.selectAll-extra"></div>
@ -14813,4 +14813,4 @@ h.onclick=h.onchange=h.onkeydown=h.onkeyup=function(){var t=h.value,r=[]
if(t.length>1){for(var i=0,o=a.length;o>i;i++)r[i]={li:a[i].li,weight:n(a[i].text,t)}
r.sort(f)}else r=a
for(i=0,o=r.length;o>i;i++)e.appendChild(r[i].li)}}}(document.getElementById("dr-toc"))</script>
</body></html>
</body></html>

View File

@ -1,3 +1,7 @@
#0.4.1
* Bug fixes.
#0.4.0
* Moved class and element related code into separate plugins
@ -35,7 +39,7 @@
* Get rid of internal SVG parser in favor of the browser
* Fix for `xlink:href` setting for images
* Fix `Element.animate()`
* Fix for animate and stroke-dashoffset
* Fix for animate and stroke-dashoffset
* Absolute transforms fix
* Fix for animation of SVG transformations, matrices and polygon points
* Various bug fixes

View File

@ -1,6 +1,6 @@
{
"name": "snapsvg",
"version": "0.4.0",
"version": "0.4.1",
"description": "JavaScript Vector Library",
"main": "./dist/snap.svg.js",
"repository": {

View File

@ -1,17 +1,17 @@
// Snap.svg @VERSION
//
//
// Copyright (c) 2013 2015 Adobe Systems Incorporated. All rights reserved.
//
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//
// http://www.apache.org/licenses/LICENSE-2.0
//
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
//
//
// build: @DATE

View File

@ -104,7 +104,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
if (!Snap._.rgTransform.test(tstr)) {
tstr = Snap._.svgTransform2string(tstr);
} else {
tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || E);
tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || "");
}
if (is(tstr, "array")) {
tstr = Snap.path ? Snap.path.toString.call(tstr) : Str(tstr);
@ -404,7 +404,6 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
= (Element) result of query selection
\*/
elproto.select = function (query) {
query = Str(query).replace(/([^\\]):/g, "$1\\:");
return wrap(this.node.querySelector(query));
};
/*\
@ -798,7 +797,7 @@ Snap.plugin(function (Snap, Element, Paper, glob, Fragment) {
if (attrs instanceof Animation) {
callback = attrs.callback;
easing = attrs.easing;
ms = easing.dur;
ms = attrs.dur;
attrs = attrs.attr;
}
var fkeys = [], tkeys = [], keys = {}, from, to, f, eq,