Fixes for bugs #153 & #155

master
Dmitry Baranovskiy 2014-01-02 18:41:23 +11:00
parent 4d9fd5ef7a
commit 7a59550f23
4 changed files with 180 additions and 144 deletions

File diff suppressed because one or more lines are too long

30
dist/snap.svg.js vendored
View File

@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and // See the License for the specific language governing permissions and
// limitations under the License. // limitations under the License.
// //
// build: 2013-12-23 // build: 2014-01-02
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved. // Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
// //
// Licensed under the Apache License, Version 2.0 (the "License"); // Licensed under the Apache License, Version 2.0 (the "License");
@ -761,7 +761,7 @@ var mina = (function (eve) {
// limitations under the License. // limitations under the License.
var Snap = (function() { var Snap = (function() {
Snap.version = "0.2.0"; Snap.version = "0.2.1";
/*\ /*\
* Snap * Snap
[ method ] [ method ]
@ -1279,6 +1279,16 @@ function Matrix(a, b, c, d, e, f) {
a[0] && (a[0] /= mag); a[0] && (a[0] /= mag);
a[1] && (a[1] /= mag); a[1] && (a[1] /= mag);
} }
/*\
* Matrix.determinant
[ method ]
**
* Finds determinant of the given matrix.
= (number) determinant
\*/
matrixproto.determinant = function () {
return this.a * this.d - this.b * this.c;
};
/*\ /*\
* Matrix.split * Matrix.split
[ method ] [ method ]
@ -1311,6 +1321,10 @@ function Matrix(a, b, c, d, e, f) {
normalize(row[1]); normalize(row[1]);
out.shear /= out.scaley; out.shear /= out.scaley;
if (this.determinant() < 0) {
out.scalex = -out.scalex;
}
// rotation // rotation
var sin = -row[0][1], var sin = -row[0][1],
cos = row[1][1]; cos = row[1][1];
@ -1337,7 +1351,7 @@ function Matrix(a, b, c, d, e, f) {
\*/ \*/
matrixproto.toTransformString = function (shorter) { matrixproto.toTransformString = function (shorter) {
var s = shorter || this.split(); var s = shorter || this.split();
if (s.isSimple) { if (!+s.shear.toFixed(9)) {
s.scalex = +s.scalex.toFixed(4); s.scalex = +s.scalex.toFixed(4);
s.scaley = +s.scaley.toFixed(4); s.scaley = +s.scaley.toFixed(4);
s.rotate = +s.rotate.toFixed(4); s.rotate = +s.rotate.toFixed(4);
@ -1886,6 +1900,9 @@ function svgTransform2string(tstr) {
if (params.length == 1) { if (params.length == 1) {
params.push(params[0], 0, 0); params.push(params[0], 0, 0);
} }
if (params.length > 2) {
params = params.slice(0, 2);
}
} }
if (name == "skewX") { if (name == "skewX") {
res.push(["m", 1, 0, math.tan(rad(params[0])), 1, 0, 0]); res.push(["m", 1, 0, math.tan(rad(params[0])), 1, 0, 0]);
@ -2345,11 +2362,10 @@ function arrayFirstValue(arr) {
}; };
} }
if (tstr instanceof Matrix) { if (tstr instanceof Matrix) {
// may be need to apply it directly this.matrix = tstr;
// TODO: investigate } else {
tstr = tstr.toTransformString();
}
extractTransform(this, tstr); extractTransform(this, tstr);
}
if (this.node) { if (this.node) {
if (this.type == "linearGradient" || this.type == "radialGradient") { if (this.type == "linearGradient" || this.type == "radialGradient") {

View File

@ -1,59 +1,17 @@
<!DOCTYPE html> ---
<html> layout: empty
<head> title: API References
<meta charset="utf-8"> permalink: /docs/
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> stylesheets:
<base href="http://snapsvg.io/docs/"> - /assets/docs/fonts/stylesheet.css
<title>Snap.svg API Reference</title> - /assets/docs/css/topcoat-desktop-light.css
<link rel="shortcut icon" href="/assets/favicon.ico?v=1"> - /assets/docs/css/main.css
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width"> - /assets/docs/css/dr.css
<link rel="stylesheet" href="/assets/docs/fonts/stylesheet.css?v=201311041519"> - /assets/docs/css/prism.css
<link rel="stylesheet" href="/assets/docs/css/topcoat-desktop-light.css?v=201311041519"> - /assets/style/docs-header.css
<link rel="stylesheet" href="/assets/docs/css/main.css?v=201311041519">
<link rel="stylesheet" href="/assets/docs/css/dr.css?v=201311041519">
<link rel="stylesheet" href="/assets/docs/css/prism.css?v=201311041519">
<link rel="stylesheet" href="/assets/style/docs-header.css?v=201311041519">
<script>
var _gaq = _gaq || [];
_gaq.push(['_setAccount', 'UA-44948757-1']);
_gaq.push(['_trackPageview']);
(function() { ---
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true; {% include header.html %}
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
function trackOutboundLink(link, category, action) {
try {
_gaq.push(['_trackEvent', category , action]);
} catch(err){}
setTimeout(function() {
document.location.href = link.href;
}, 100);
}
</script>
</head>
<body class="light">
<header id="header">
<div class="wrap">
<a href="/" class="logo">
<img src="/assets/images/logo.svg" alt=""/>
<span class="header">Snap.svg</span>
</a>
<nav>
<a href="/">Home</a>
<a href="/about/">Why Snap</a>
<a href="/start/" class="mobile-hide">Getting Started</a>
<a href="/docs/" class="mobile-hide selected">Docs</a>
<a href="/support/">Support</a>
<a href="/demos/" class="mobile-hide">Demos</a>
<a class="bt" href="/assets/downloads/Snap.svg-0.1.0.zip" onclick="trackOutboundLink(this, 'Download', '0.1');return false;">Download</a>
</nav>
</div>
</header>
<!--[if lt IE 9]> <!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]--> <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
@ -331,6 +289,10 @@
<a href="#Matrix.clone" class="dr-method"><span>Matrix.clone()</span></a> <a href="#Matrix.clone" class="dr-method"><span>Matrix.clone()</span></a>
</li> </li>
<li class="dr-lvl1">
<a href="#Matrix.determinant" class="dr-method"><span>Matrix.determinant()</span></a>
</li>
<li class="dr-lvl1"> <li class="dr-lvl1">
<a href="#Matrix.invert" class="dr-method"><span>Matrix.invert()</span></a> <a href="#Matrix.invert" class="dr-method"><span>Matrix.invert()</span></a>
</li> </li>
@ -1727,13 +1689,55 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
</div>
</section>
</article>
<article id="Matrix.determinant">
<header>
<h3 class="dr-method">Matrix.determinant()<a href="#Matrix.determinant" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 541 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#541">&#x27ad;</a></h3>
</header>
<section>
<div class="extra" id="Matrix.determinant-extra"></div>
<div class="dr-method">
<p>Finds determinant of the given matrix.
</p>
<p class="dr-returns">
<strong class="dr-title">Returns:</strong>
<em class="dr-type-number">number</em>
<span class="dr-description">determinant</span>
</p>
</div> </div>
</section> </section>
</article> </article>
<article id="Matrix.split"> <article id="Matrix.split">
<header> <header>
<h3 class="dr-method">Matrix.split()<a href="#Matrix.split" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 548 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#548">&#x27ad;</a></h3> <h3 class="dr-method">Matrix.split()<a href="#Matrix.split" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 558 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#558">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Matrix.split-extra"></div> <div class="extra" id="Matrix.split-extra"></div>
@ -1843,7 +1847,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Matrix.toTransformString"> <article id="Matrix.toTransformString">
<header> <header>
<h3 class="dr-method">Matrix.toTransformString()<a href="#Matrix.toTransformString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 590 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#590">&#x27ad;</a></h3> <h3 class="dr-method">Matrix.toTransformString()<a href="#Matrix.toTransformString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 604 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#604">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Matrix.toTransformString-extra"></div> <div class="extra" id="Matrix.toTransformString-extra"></div>
@ -1885,7 +1889,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<article id="Snap.Matrix"> <article id="Snap.Matrix">
<header> <header>
<h3 class="dr-method">Snap.Matrix(…)<a href="#Snap.Matrix" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 621 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#621">&#x27ad;</a></h3> <h3 class="dr-method">Snap.Matrix(…)<a href="#Snap.Matrix" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 635 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#635">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.Matrix-extra"></div> <div class="extra" id="Snap.Matrix-extra"></div>
@ -1990,7 +1994,7 @@ Returns a matrix based on the given parameters
<article id="Snap.getRGB"> <article id="Snap.getRGB">
<header> <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 656 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#656">&#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 670 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#670">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.getRGB-extra"></div> <div class="extra" id="Snap.getRGB-extra"></div>
@ -2325,7 +2329,7 @@ Returns a matrix based on the given parameters
<article id="Snap.hsb"> <article id="Snap.hsb">
<header> <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 745 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#745">&#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 759 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#759">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.hsb-extra"></div> <div class="extra" id="Snap.hsb-extra"></div>
@ -2391,7 +2395,7 @@ Returns a matrix based on the given parameters
<article id="Snap.hsl"> <article id="Snap.hsl">
<header> <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 758 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#758">&#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 772 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#772">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.hsl-extra"></div> <div class="extra" id="Snap.hsl-extra"></div>
@ -2457,7 +2461,7 @@ Returns a matrix based on the given parameters
<article id="Snap.rgb"> <article id="Snap.rgb">
<header> <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 771 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#771">&#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 785 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#785">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.rgb-extra"></div> <div class="extra" id="Snap.rgb-extra"></div>
@ -2523,7 +2527,7 @@ Returns a matrix based on the given parameters
<article id="Snap.color"> <article id="Snap.color">
<header> <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 858 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#858">&#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 872 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#872">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.color-extra"></div> <div class="extra" id="Snap.color-extra"></div>
@ -2675,7 +2679,7 @@ Returns a matrix based on the given parameters
<article id="Snap.hsb2rgb"> <article id="Snap.hsb2rgb">
<header> <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 910 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#910">&#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 924 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#924">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.hsb2rgb-extra"></div> <div class="extra" id="Snap.hsb2rgb-extra"></div>
@ -2793,7 +2797,7 @@ Returns a matrix based on the given parameters
<article id="Snap.hsl2rgb"> <article id="Snap.hsl2rgb">
<header> <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 946 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#946">&#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 960 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#960">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.hsl2rgb-extra"></div> <div class="extra" id="Snap.hsl2rgb-extra"></div>
@ -2911,7 +2915,7 @@ Returns a matrix based on the given parameters
<article id="Snap.rgb2hsb"> <article id="Snap.rgb2hsb">
<header> <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 985 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#985">&#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 999 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#999">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.rgb2hsb-extra"></div> <div class="extra" id="Snap.rgb2hsb-extra"></div>
@ -3021,7 +3025,7 @@ Returns a matrix based on the given parameters
<article id="Snap.rgb2hsl"> <article id="Snap.rgb2hsl">
<header> <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 1018 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1018">&#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 1032 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1032">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.rgb2hsl-extra"></div> <div class="extra" id="Snap.rgb2hsl-extra"></div>
@ -3131,7 +3135,7 @@ Returns a matrix based on the given parameters
<article id="Snap.parsePathString"> <article id="Snap.parsePathString">
<header> <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 1052 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1052">&#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 1066 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1066">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.parsePathString-extra"></div> <div class="extra" id="Snap.parsePathString-extra"></div>
@ -3192,7 +3196,7 @@ Parses given path string into an array of arrays of path segments
<article id="Snap.parseTransformString"> <article id="Snap.parseTransformString">
<header> <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 1105 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1105">&#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 1119 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1119">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.parseTransformString-extra"></div> <div class="extra" id="Snap.parseTransformString-extra"></div>
@ -3253,7 +3257,7 @@ Parses given transform string into an array of transformations
<article id="Snap.select"> <article id="Snap.select">
<header> <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 1387 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1387">&#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 1404 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1404">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.select-extra"></div> <div class="extra" id="Snap.select-extra"></div>
@ -3313,7 +3317,7 @@ Parses given transform string into an array of transformations
<article id="Snap.selectAll"> <article id="Snap.selectAll">
<header> <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 1398 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1398">&#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 1415 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1415">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.selectAll-extra"></div> <div class="extra" id="Snap.selectAll-extra"></div>
@ -3373,7 +3377,7 @@ Parses given transform string into an array of transformations
<article id="Element.attr"> <article id="Element.attr">
<header> <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 1488 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1488">&#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 1505 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1505">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.attr-extra"></div> <div class="extra" id="Element.attr-extra"></div>
@ -3518,7 +3522,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.getBBox"> <article id="Element.getBBox">
<header> <header>
<h3 class="dr-method">Element.getBBox()<a href="#Element.getBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1537 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1537">&#x27ad;</a></h3> <h3 class="dr-method">Element.getBBox()<a href="#Element.getBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1554 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1554">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.getBBox-extra"></div> <div class="extra" id="Element.getBBox-extra"></div>
@ -3700,7 +3704,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.transform"> <article id="Element.transform">
<header> <header>
<h3 class="dr-method">Element.transform(tstr)<a href="#Element.transform" 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/savage/blob/master/src/svg.js#1581">&#x27ad;</a></h3> <h3 class="dr-method">Element.transform(tstr)<a href="#Element.transform" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1598 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1598">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.transform-extra"></div> <div class="extra" id="Element.transform-extra"></div>
@ -3864,7 +3868,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.parent"> <article id="Element.parent">
<header> <header>
<h3 class="dr-method">Element.parent()<a href="#Element.parent" 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/savage/blob/master/src/svg.js#1626">&#x27ad;</a></h3> <h3 class="dr-method">Element.parent()<a href="#Element.parent" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1642 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1642">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.parent-extra"></div> <div class="extra" id="Element.parent-extra"></div>
@ -3906,7 +3910,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.append"> <article id="Element.append">
<header> <header>
<h3 class="dr-method">Element.append(el)<a href="#Element.append" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1638 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1638">&#x27ad;</a></h3> <h3 class="dr-method">Element.append(el)<a href="#Element.append" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1654 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1654">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.append-extra"></div> <div class="extra" id="Element.append-extra"></div>
@ -3966,7 +3970,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.add"> <article id="Element.add">
<header> <header>
<h3 class="dr-method">Element.add()<a href="#Element.add" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1644 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1644">&#x27ad;</a></h3> <h3 class="dr-method">Element.add()<a href="#Element.add" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1660 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1660">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.add-extra"></div> <div class="extra" id="Element.add-extra"></div>
@ -3991,7 +3995,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.appendTo"> <article id="Element.appendTo">
<header> <header>
<h3 class="dr-method">Element.appendTo(el)<a href="#Element.appendTo" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1668 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1668">&#x27ad;</a></h3> <h3 class="dr-method">Element.appendTo(el)<a href="#Element.appendTo" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1684 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1684">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.appendTo-extra"></div> <div class="extra" id="Element.appendTo-extra"></div>
@ -4051,7 +4055,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.prepend"> <article id="Element.prepend">
<header> <header>
<h3 class="dr-method">Element.prepend(el)<a href="#Element.prepend" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1684 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1684">&#x27ad;</a></h3> <h3 class="dr-method">Element.prepend(el)<a href="#Element.prepend" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1700 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1700">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.prepend-extra"></div> <div class="extra" id="Element.prepend-extra"></div>
@ -4111,7 +4115,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.prependTo"> <article id="Element.prependTo">
<header> <header>
<h3 class="dr-method">Element.prependTo(el)<a href="#Element.prependTo" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1705 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1705">&#x27ad;</a></h3> <h3 class="dr-method">Element.prependTo(el)<a href="#Element.prependTo" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1721 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1721">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.prependTo-extra"></div> <div class="extra" id="Element.prependTo-extra"></div>
@ -4171,7 +4175,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.before"> <article id="Element.before">
<header> <header>
<h3 class="dr-method">Element.before(el)<a href="#Element.before" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1719 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1719">&#x27ad;</a></h3> <h3 class="dr-method">Element.before(el)<a href="#Element.before" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1735 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1735">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.before-extra"></div> <div class="extra" id="Element.before-extra"></div>
@ -4231,7 +4235,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.after"> <article id="Element.after">
<header> <header>
<h3 class="dr-method">Element.after(el)<a href="#Element.after" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1747 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1747">&#x27ad;</a></h3> <h3 class="dr-method">Element.after(el)<a href="#Element.after" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1763 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1763">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.after-extra"></div> <div class="extra" id="Element.after-extra"></div>
@ -4291,7 +4295,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.insertBefore"> <article id="Element.insertBefore">
<header> <header>
<h3 class="dr-method">Element.insertBefore(el)<a href="#Element.insertBefore" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1769 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1769">&#x27ad;</a></h3> <h3 class="dr-method">Element.insertBefore(el)<a href="#Element.insertBefore" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1785 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1785">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.insertBefore-extra"></div> <div class="extra" id="Element.insertBefore-extra"></div>
@ -4351,7 +4355,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.insertAfter"> <article id="Element.insertAfter">
<header> <header>
<h3 class="dr-method">Element.insertAfter(el)<a href="#Element.insertAfter" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1787 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1787">&#x27ad;</a></h3> <h3 class="dr-method">Element.insertAfter(el)<a href="#Element.insertAfter" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1803 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1803">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.insertAfter-extra"></div> <div class="extra" id="Element.insertAfter-extra"></div>
@ -4411,7 +4415,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.remove"> <article id="Element.remove">
<header> <header>
<h3 class="dr-method">Element.remove()<a href="#Element.remove" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1803 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1803">&#x27ad;</a></h3> <h3 class="dr-method">Element.remove()<a href="#Element.remove" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1819 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1819">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.remove-extra"></div> <div class="extra" id="Element.remove-extra"></div>
@ -4453,7 +4457,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.select"> <article id="Element.select">
<header> <header>
<h3 class="dr-method">Element.select(query)<a href="#Element.select" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1820 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1820">&#x27ad;</a></h3> <h3 class="dr-method">Element.select(query)<a href="#Element.select" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1836 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1836">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.select-extra"></div> <div class="extra" id="Element.select-extra"></div>
@ -4513,7 +4517,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.selectAll"> <article id="Element.selectAll">
<header> <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 1832 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1832">&#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 1848 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1848">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.selectAll-extra"></div> <div class="extra" id="Element.selectAll-extra"></div>
@ -4575,7 +4579,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.asPX"> <article id="Element.asPX">
<header> <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 1850 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1850">&#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 1866 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1866">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.asPX-extra"></div> <div class="extra" id="Element.asPX-extra"></div>
@ -4638,7 +4642,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.use"> <article id="Element.use">
<header> <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 1865 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1865">&#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 1881 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1881">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.use-extra"></div> <div class="extra" id="Element.use-extra"></div>
@ -4680,7 +4684,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.clone"> <article id="Element.clone">
<header> <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 1894 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1894">&#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 1910 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1910">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.clone-extra"></div> <div class="extra" id="Element.clone-extra"></div>
@ -4722,7 +4726,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.toDefs"> <article id="Element.toDefs">
<header> <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 1974 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1974">&#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 1990 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1990">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.toDefs-extra"></div> <div class="extra" id="Element.toDefs-extra"></div>
@ -4764,7 +4768,7 @@ console.log(el.attr("fill")); // #fc0</code></pre></section>
<article id="Element.pattern"> <article id="Element.pattern">
<header> <header>
<h3 class="dr-method">Element.pattern(x, y, width, height)<a href="#Element.pattern" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2004 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2004">&#x27ad;</a></h3> <h3 class="dr-method">Element.pattern(x, y, width, height)<a href="#Element.pattern" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2020 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2020">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.pattern-extra"></div> <div class="extra" id="Element.pattern-extra"></div>
@ -4864,7 +4868,7 @@ c.attr({
<article id="Element.marker"> <article id="Element.marker">
<header> <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 2045 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2045">&#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 2061 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2061">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.marker-extra"></div> <div class="extra" id="Element.marker-extra"></div>
@ -4951,7 +4955,7 @@ To create a marker you have to specify the bounding rect and reference point:
<article id="Snap.animation"> <article id="Snap.animation">
<header> <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 2104 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2104">&#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 2120 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2120">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.animation-extra"></div> <div class="extra" id="Snap.animation-extra"></div>
@ -5020,7 +5024,7 @@ To create a marker you have to specify the bounding rect and reference point:
<article id="Element.inAnim"> <article id="Element.inAnim">
<header> <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 2121 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2121">&#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 2137 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2137">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.inAnim-extra"></div> <div class="extra" id="Element.inAnim-extra"></div>
@ -5114,7 +5118,7 @@ To create a marker you have to specify the bounding rect and reference point:
<article id="Snap.animate"> <article id="Snap.animate">
<header> <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 2170 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2170">&#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 2186 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2186">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.animate-extra"></div> <div class="extra" id="Snap.animate-extra"></div>
@ -5275,7 +5279,7 @@ rect.animate({x: 10}, 1000);</code></pre></section>
<article id="Element.stop"> <article id="Element.stop">
<header> <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 2188 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2188">&#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 2204 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2204">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.stop-extra"></div> <div class="extra" id="Element.stop-extra"></div>
@ -5317,7 +5321,7 @@ rect.animate({x: 10}, 1000);</code></pre></section>
<article id="Element.animate"> <article id="Element.animate">
<header> <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 2209 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2209">&#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 2225 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2225">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.animate-extra"></div> <div class="extra" id="Element.animate-extra"></div>
@ -5386,7 +5390,7 @@ rect.animate({x: 10}, 1000);</code></pre></section>
<article id="Element.data"> <article id="Element.data">
<header> <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 2281 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2281">&#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 2297 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2297">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.data-extra"></div> <div class="extra" id="Element.data-extra"></div>
@ -5508,7 +5512,7 @@ with <code>data-</code> attributes)
<article id="Element.removeData"> <article id="Element.removeData">
<header> <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 2310 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2310">&#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 2326 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2326">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.removeData-extra"></div> <div class="extra" id="Element.removeData-extra"></div>
@ -5569,7 +5573,7 @@ If key is not provided, removes all the data of the element.
<article id="Element.outerSVG"> <article id="Element.outerSVG">
<header> <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 2327 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2327">&#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 2343 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2343">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.outerSVG-extra"></div> <div class="extra" id="Element.outerSVG-extra"></div>
@ -5612,7 +5616,7 @@ If key is not provided, removes all the data of the element.
<article id="undefined"> <article id="undefined">
<header> <header>
<h3 class="dr-method">undefined<a href="#undefined" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2333 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2333">&#x27ad;</a></h3> <h3 class="dr-method">undefined<a href="#undefined" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2349 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2349">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="undefined-extra"></div> <div class="extra" id="undefined-extra"></div>
@ -5637,7 +5641,7 @@ If key is not provided, removes all the data of the element.
<article id="Element.innerSVG"> <article id="Element.innerSVG">
<header> <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 2341 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2341">&#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 2357 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2357">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.innerSVG-extra"></div> <div class="extra" id="Element.innerSVG-extra"></div>
@ -5679,7 +5683,7 @@ If key is not provided, removes all the data of the element.
<article id="Snap.parse"> <article id="Snap.parse">
<header> <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 2380 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2380">&#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 2396 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2396">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.parse-extra"></div> <div class="extra" id="Snap.parse-extra"></div>
@ -5739,7 +5743,7 @@ If key is not provided, removes all the data of the element.
<article id="Fragment.select"> <article id="Fragment.select">
<header> <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 2412 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2412">&#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 2428 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2428">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Fragment.select-extra"></div> <div class="extra" id="Fragment.select-extra"></div>
@ -5764,7 +5768,7 @@ If key is not provided, removes all the data of the element.
<article id="Fragment.selectAll"> <article id="Fragment.selectAll">
<header> <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 2419 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2419">&#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 2435 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2435">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Fragment.selectAll-extra"></div> <div class="extra" id="Fragment.selectAll-extra"></div>
@ -5789,7 +5793,7 @@ If key is not provided, removes all the data of the element.
<article id="Snap.fragment"> <article id="Snap.fragment">
<header> <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 2430 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2430">&#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 2446 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2446">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.fragment-extra"></div> <div class="extra" id="Snap.fragment-extra"></div>
@ -5849,7 +5853,7 @@ If key is not provided, removes all the data of the element.
<article id="Paper.el"> <article id="Paper.el">
<header> <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 2637 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2637">&#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 2653 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2653">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.el-extra"></div> <div class="extra" id="Paper.el-extra"></div>
@ -5945,7 +5949,7 @@ var c = paper.el("circle", {
<article id="Paper.rect"> <article id="Paper.rect">
<header> <header>
<h3 class="dr-method">Paper.rect(x, y, width, height, [rx], [ry])<a href="#Paper.rect" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2660 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2660">&#x27ad;</a></h3> <h3 class="dr-method">Paper.rect(x, y, width, height, [rx], [ry])<a href="#Paper.rect" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2676 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2676">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.rect-extra"></div> <div class="extra" id="Paper.rect-extra"></div>
@ -6045,7 +6049,7 @@ var c = paper.rect(40, 40, 50, 50, 10);</code></pre></section>
<article id="Paper.circle"> <article id="Paper.circle">
<header> <header>
<h3 class="dr-method">Paper.circle(x, y, r)<a href="#Paper.circle" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2695 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2695">&#x27ad;</a></h3> <h3 class="dr-method">Paper.circle(x, y, r)<a href="#Paper.circle" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2711 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2711">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.circle-extra"></div> <div class="extra" id="Paper.circle-extra"></div>
@ -6133,7 +6137,7 @@ var c = paper.rect(40, 40, 50, 50, 10);</code></pre></section>
<article id="Paper.image"> <article id="Paper.image">
<header> <header>
<h3 class="dr-method">Paper.image(src, x, y, width, height)<a href="#Paper.image" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2727 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2727">&#x27ad;</a></h3> <h3 class="dr-method">Paper.image(src, x, y, width, height)<a href="#Paper.image" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2743 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2743">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.image-extra"></div> <div class="extra" id="Paper.image-extra"></div>
@ -6255,7 +6259,7 @@ var c = paper.rect(40, 40, 50, 50, 10);</code></pre></section>
<article id="Paper.ellipse"> <article id="Paper.ellipse">
<header> <header>
<h3 class="dr-method">Paper.ellipse(x, y, rx, ry)<a href="#Paper.ellipse" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2770 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2770">&#x27ad;</a></h3> <h3 class="dr-method">Paper.ellipse(x, y, rx, ry)<a href="#Paper.ellipse" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2786 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2786">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.ellipse-extra"></div> <div class="extra" id="Paper.ellipse-extra"></div>
@ -6346,7 +6350,7 @@ var c = paper.rect(40, 40, 50, 50, 10);</code></pre></section>
<article id="Paper.path"> <article id="Paper.path">
<header> <header>
<h3 class="dr-method">Paper.path([pathString])<a href="#Paper.path" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2815 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2815">&#x27ad;</a></h3> <h3 class="dr-method">Paper.path([pathString])<a href="#Paper.path" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2831 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2831">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.path-extra"></div> <div class="extra" id="Paper.path-extra"></div>
@ -6614,7 +6618,7 @@ Note: there is a special case when a path consists of only three commands: <code
<article id="Paper.g"> <article id="Paper.g">
<header> <header>
<h3 class="dr-method">Paper.g([varargs])<a href="#Paper.g" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2846 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2846">&#x27ad;</a></h3> <h3 class="dr-method">Paper.g([varargs])<a href="#Paper.g" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2862 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2862">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.g-extra"></div> <div class="extra" id="Paper.g-extra"></div>
@ -6723,7 +6727,7 @@ g.add(c2, c1);</code></pre></section>
<article id="Paper.group"> <article id="Paper.group">
<header> <header>
<h3 class="dr-method">Paper.group()<a href="#Paper.group" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2852 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2852">&#x27ad;</a></h3> <h3 class="dr-method">Paper.group()<a href="#Paper.group" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2868 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2868">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.group-extra"></div> <div class="extra" id="Paper.group-extra"></div>
@ -6748,7 +6752,7 @@ g.add(c2, c1);</code></pre></section>
<article id="Paper.text"> <article id="Paper.text">
<header> <header>
<h3 class="dr-method">Paper.text(x, y, text)<a href="#Paper.text" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2885 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2885">&#x27ad;</a></h3> <h3 class="dr-method">Paper.text(x, y, text)<a href="#Paper.text" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2901 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2901">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.text-extra"></div> <div class="extra" id="Paper.text-extra"></div>
@ -6842,7 +6846,7 @@ t1.attr({textpath: pth});</code></pre></section>
<article id="Paper.line"> <article id="Paper.line">
<header> <header>
<h3 class="dr-method">Paper.line(x1, y1, x2, y2)<a href="#Paper.line" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2913 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2913">&#x27ad;</a></h3> <h3 class="dr-method">Paper.line(x1, y1, x2, y2)<a href="#Paper.line" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2929 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2929">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.line-extra"></div> <div class="extra" id="Paper.line-extra"></div>
@ -6933,7 +6937,7 @@ t1.attr({textpath: pth});</code></pre></section>
<article id="Paper.polyline"> <article id="Paper.polyline">
<header> <header>
<h3 class="dr-method">Paper.polyline(…)<a href="#Paper.polyline" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2942 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2942">&#x27ad;</a></h3> <h3 class="dr-method">Paper.polyline(…)<a href="#Paper.polyline" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2958 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2958">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.polyline-extra"></div> <div class="extra" id="Paper.polyline-extra"></div>
@ -7045,7 +7049,7 @@ var p2 = paper.polyline(10, 10, 100, 100);</code></pre></section>
<article id="Paper.polygon"> <article id="Paper.polygon">
<header> <header>
<h3 class="dr-method">Paper.polygon()<a href="#Paper.polygon" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2962 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2962">&#x27ad;</a></h3> <h3 class="dr-method">Paper.polygon()<a href="#Paper.polygon" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2978 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2978">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.polygon-extra"></div> <div class="extra" id="Paper.polygon-extra"></div>
@ -7070,7 +7074,7 @@ var p2 = paper.polyline(10, 10, 100, 100);</code></pre></section>
<article id="Paper.gradient"> <article id="Paper.gradient">
<header> <header>
<h3 class="dr-method">Paper.gradient(gradient)<a href="#Paper.gradient" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3015 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3015">&#x27ad;</a></h3> <h3 class="dr-method">Paper.gradient(gradient)<a href="#Paper.gradient" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3031 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3031">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.gradient-extra"></div> <div class="extra" id="Paper.gradient-extra"></div>
@ -7268,7 +7272,7 @@ half the width, from black to white:
<article id="Paper.toString"> <article id="Paper.toString">
<header> <header>
<h3 class="dr-method">Paper.toString()<a href="#Paper.toString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3031 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3031">&#x27ad;</a></h3> <h3 class="dr-method">Paper.toString()<a href="#Paper.toString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3047 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3047">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.toString-extra"></div> <div class="extra" id="Paper.toString-extra"></div>
@ -7310,7 +7314,7 @@ half the width, from black to white:
<article id="Paper.clear"> <article id="Paper.clear">
<header> <header>
<h3 class="dr-method">Paper.clear()<a href="#Paper.clear" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3049 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3049">&#x27ad;</a></h3> <h3 class="dr-method">Paper.clear()<a href="#Paper.clear" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 3065 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3065">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.clear-extra"></div> <div class="extra" id="Paper.clear-extra"></div>
@ -7335,7 +7339,7 @@ half the width, from black to white:
<article id="Snap.ajax"> <article id="Snap.ajax">
<header> <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 3080 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3080">&#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 3096 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3096">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.ajax-extra"></div> <div class="extra" id="Snap.ajax-extra"></div>
@ -7439,7 +7443,7 @@ half the width, from black to white:
<article id="Snap.load"> <article id="Snap.load">
<header> <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 3126 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3126">&#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 3142 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3142">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.load-extra"></div> <div class="extra" id="Snap.load-extra"></div>
@ -7488,7 +7492,7 @@ half the width, from black to white:
<article id="Snap.getElementByPoint"> <article id="Snap.getElementByPoint">
<header> <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 3606 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3606">&#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 3622 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3622">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.getElementByPoint-extra"></div> <div class="extra" id="Snap.getElementByPoint-extra"></div>
@ -7573,7 +7577,7 @@ half the width, from black to white:
<article id="Snap.plugin"> <article id="Snap.plugin">
<header> <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 3641 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3641">&#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 3657 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3657">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.plugin-extra"></div> <div class="extra" id="Snap.plugin-extra"></div>

View File

@ -13,7 +13,7 @@
// limitations under the License. // limitations under the License.
var Snap = (function() { var Snap = (function() {
Snap.version = "0.2.0"; Snap.version = "0.2.1";
/*\ /*\
* Snap * Snap
[ method ] [ method ]
@ -531,6 +531,16 @@ function Matrix(a, b, c, d, e, f) {
a[0] && (a[0] /= mag); a[0] && (a[0] /= mag);
a[1] && (a[1] /= mag); a[1] && (a[1] /= mag);
} }
/*\
* Matrix.determinant
[ method ]
**
* Finds determinant of the given matrix.
= (number) determinant
\*/
matrixproto.determinant = function () {
return this.a * this.d - this.b * this.c;
};
/*\ /*\
* Matrix.split * Matrix.split
[ method ] [ method ]
@ -563,6 +573,10 @@ function Matrix(a, b, c, d, e, f) {
normalize(row[1]); normalize(row[1]);
out.shear /= out.scaley; out.shear /= out.scaley;
if (this.determinant() < 0) {
out.scalex = -out.scalex;
}
// rotation // rotation
var sin = -row[0][1], var sin = -row[0][1],
cos = row[1][1]; cos = row[1][1];
@ -589,7 +603,7 @@ function Matrix(a, b, c, d, e, f) {
\*/ \*/
matrixproto.toTransformString = function (shorter) { matrixproto.toTransformString = function (shorter) {
var s = shorter || this.split(); var s = shorter || this.split();
if (s.isSimple) { if (!+s.shear.toFixed(9)) {
s.scalex = +s.scalex.toFixed(4); s.scalex = +s.scalex.toFixed(4);
s.scaley = +s.scaley.toFixed(4); s.scaley = +s.scaley.toFixed(4);
s.rotate = +s.rotate.toFixed(4); s.rotate = +s.rotate.toFixed(4);
@ -1138,6 +1152,9 @@ function svgTransform2string(tstr) {
if (params.length == 1) { if (params.length == 1) {
params.push(params[0], 0, 0); params.push(params[0], 0, 0);
} }
if (params.length > 2) {
params = params.slice(0, 2);
}
} }
if (name == "skewX") { if (name == "skewX") {
res.push(["m", 1, 0, math.tan(rad(params[0])), 1, 0, 0]); res.push(["m", 1, 0, math.tan(rad(params[0])), 1, 0, 0]);
@ -1597,11 +1614,10 @@ function arrayFirstValue(arr) {
}; };
} }
if (tstr instanceof Matrix) { if (tstr instanceof Matrix) {
// may be need to apply it directly this.matrix = tstr;
// TODO: investigate } else {
tstr = tstr.toTransformString();
}
extractTransform(this, tstr); extractTransform(this, tstr);
}
if (this.node) { if (this.node) {
if (this.type == "linearGradient" || this.type == "radialGradient") { if (this.type == "linearGradient" || this.type == "radialGradient") {