Fix for #197: Transform of <use>

master
Dmitry Baranovskiy 2014-03-07 13:22:40 +11:00
parent f09212b211
commit db451db0e2
4 changed files with 85 additions and 118 deletions

File diff suppressed because one or more lines are too long

50
dist/snap.svg.js vendored
View File

@ -2320,7 +2320,12 @@ function arrayFirstValue(arr) {
elproto.getBBox = function (isWithoutTransform) { elproto.getBBox = function (isWithoutTransform) {
var el = this; var el = this;
if (el.type == "use") { if (el.type == "use") {
el = el.original; if (el.original) {
el = el.original;
} else {
var href = el.attr("xlink:href");
el = glob.doc.getElementById(href.substring(href.indexOf("#") + 1));
}
} }
if (el.removed) { if (el.removed) {
return {}; return {};
@ -5359,49 +5364,6 @@ Snap.plugin(function (Snap, Element, Paper, glob) {
}; };
} }
function curveDim2(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y) {
var a = (c2x - 2 * c1x + p1x) - (p2x - 2 * c2x + c1x),
b = 2 * (c1x - p1x) - 2 * (c2x - c1x),
c = p1x - c1x,
t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a,
t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a,
y = [p1y, p2y],
x = [p1x, p2x],
dot;
abs(t1) > "1e12" && (t1 = .5);
abs(t2) > "1e12" && (t2 = .5);
if (t1 > 0 && t1 < 1) {
dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1);
x.push(dot.x);
y.push(dot.y);
}
if (t2 > 0 && t2 < 1) {
dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2);
x.push(dot.x);
y.push(dot.y);
}
a = (c2y - 2 * c1y + p1y) - (p2y - 2 * c2y + c1y);
b = 2 * (c1y - p1y) - 2 * (c2y - c1y);
c = p1y - c1y;
t1 = (-b + math.sqrt(b * b - 4 * a * c)) / 2 / a;
t2 = (-b - math.sqrt(b * b - 4 * a * c)) / 2 / a;
abs(t1) > "1e12" && (t1 = .5);
abs(t2) > "1e12" && (t2 = .5);
if (t1 > 0 && t1 < 1) {
dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t1);
x.push(dot.x);
y.push(dot.y);
}
if (t2 > 0 && t2 < 1) {
dot = findDotAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t2);
x.push(dot.x);
y.push(dot.y);
}
return {
min: {x: mmin.apply(0, x), y: mmin.apply(0, y)},
max: {x: mmax.apply(0, x), y: mmax.apply(0, y)}
};
}
function path2curve(path, path2) { function path2curve(path, path2) {
var pth = !path2 && paths(path); var pth = !path2 && paths(path);
if (!path2 && pth.curve) { if (!path2 && pth.curve) {

View File

@ -3830,7 +3830,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 1613 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1613">&#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 1618 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1618">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.transform-extra"></div> <div class="extra" id="Element.transform-extra"></div>
@ -3994,7 +3994,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 1657 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1657">&#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 1662 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1662">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.parent-extra"></div> <div class="extra" id="Element.parent-extra"></div>
@ -4036,7 +4036,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 1669 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1669">&#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 1674 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1674">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.append-extra"></div> <div class="extra" id="Element.append-extra"></div>
@ -4096,7 +4096,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 1675 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1675">&#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 1680 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1680">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.add-extra"></div> <div class="extra" id="Element.add-extra"></div>
@ -4121,7 +4121,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 1699 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1699">&#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 1704 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1704">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.appendTo-extra"></div> <div class="extra" id="Element.appendTo-extra"></div>
@ -4181,7 +4181,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 1715 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1715">&#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 1720 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1720">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.prepend-extra"></div> <div class="extra" id="Element.prepend-extra"></div>
@ -4241,7 +4241,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 1736 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1736">&#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 1741 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1741">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.prependTo-extra"></div> <div class="extra" id="Element.prependTo-extra"></div>
@ -4301,7 +4301,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 1750 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1750">&#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 1755 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1755">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.before-extra"></div> <div class="extra" id="Element.before-extra"></div>
@ -4361,7 +4361,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 1778 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1778">&#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 1783 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1783">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.after-extra"></div> <div class="extra" id="Element.after-extra"></div>
@ -4421,7 +4421,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 1800 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1800">&#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 1805 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1805">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.insertBefore-extra"></div> <div class="extra" id="Element.insertBefore-extra"></div>
@ -4481,7 +4481,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 1818 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1818">&#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 1823 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1823">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.insertAfter-extra"></div> <div class="extra" id="Element.insertAfter-extra"></div>
@ -4541,7 +4541,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 1834 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1834">&#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 1839 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1839">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.remove-extra"></div> <div class="extra" id="Element.remove-extra"></div>
@ -4583,7 +4583,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 1851 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1851">&#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 1856 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1856">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.select-extra"></div> <div class="extra" id="Element.select-extra"></div>
@ -4643,7 +4643,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 1863 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1863">&#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 1868 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1868">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.selectAll-extra"></div> <div class="extra" id="Element.selectAll-extra"></div>
@ -4705,7 +4705,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 1881 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1881">&#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 1886 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1886">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.asPX-extra"></div> <div class="extra" id="Element.asPX-extra"></div>
@ -4768,7 +4768,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 1896 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1896">&#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 1901 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1901">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.use-extra"></div> <div class="extra" id="Element.use-extra"></div>
@ -4810,7 +4810,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 1925 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1925">&#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 1930 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1930">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.clone-extra"></div> <div class="extra" id="Element.clone-extra"></div>
@ -4852,7 +4852,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 2005 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2005">&#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 2010 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2010">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.toDefs-extra"></div> <div class="extra" id="Element.toDefs-extra"></div>
@ -4894,7 +4894,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 2035 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2035">&#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 2040 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2040">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.pattern-extra"></div> <div class="extra" id="Element.pattern-extra"></div>
@ -4994,7 +4994,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 2076 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2076">&#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 2081 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2081">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.marker-extra"></div> <div class="extra" id="Element.marker-extra"></div>
@ -5081,7 +5081,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 2135 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2135">&#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 2140 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2140">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.animation-extra"></div> <div class="extra" id="Snap.animation-extra"></div>
@ -5150,7 +5150,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 2152 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2152">&#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 2157 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2157">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.inAnim-extra"></div> <div class="extra" id="Element.inAnim-extra"></div>
@ -5244,7 +5244,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 2201 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2201">&#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 2206 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2206">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.animate-extra"></div> <div class="extra" id="Snap.animate-extra"></div>
@ -5405,7 +5405,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 2219 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2219">&#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 2224 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2224">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.stop-extra"></div> <div class="extra" id="Element.stop-extra"></div>
@ -5447,7 +5447,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 2240 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2240">&#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 2245 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2245">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.animate-extra"></div> <div class="extra" id="Element.animate-extra"></div>
@ -5516,7 +5516,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 2312 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2312">&#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 2317 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2317">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.data-extra"></div> <div class="extra" id="Element.data-extra"></div>
@ -5638,7 +5638,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 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.removeData([key])<a href="#Element.removeData" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2346 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2346">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.removeData-extra"></div> <div class="extra" id="Element.removeData-extra"></div>
@ -5699,7 +5699,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 2358 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2358">&#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 2363 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2363">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.outerSVG-extra"></div> <div class="extra" id="Element.outerSVG-extra"></div>
@ -5742,7 +5742,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 2364 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2364">&#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 2369 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2369">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="undefined-extra"></div> <div class="extra" id="undefined-extra"></div>
@ -5767,7 +5767,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 2372 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2372">&#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 2377 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2377">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.innerSVG-extra"></div> <div class="extra" id="Element.innerSVG-extra"></div>
@ -5809,7 +5809,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 2411 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2411">&#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 2416 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2416">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.parse-extra"></div> <div class="extra" id="Snap.parse-extra"></div>
@ -5869,7 +5869,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 2443 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2443">&#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 2448 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2448">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Fragment.select-extra"></div> <div class="extra" id="Fragment.select-extra"></div>
@ -5894,7 +5894,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 2450 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2450">&#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 2455 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2455">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Fragment.selectAll-extra"></div> <div class="extra" id="Fragment.selectAll-extra"></div>
@ -5919,7 +5919,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 2461 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2461">&#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 2466 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2466">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.fragment-extra"></div> <div class="extra" id="Snap.fragment-extra"></div>
@ -5979,7 +5979,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 2668 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2668">&#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 2673 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2673">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.el-extra"></div> <div class="extra" id="Paper.el-extra"></div>
@ -6075,7 +6075,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 2691 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2691">&#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 2696 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2696">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.rect-extra"></div> <div class="extra" id="Paper.rect-extra"></div>
@ -6175,7 +6175,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 2726 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2726">&#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 2731 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2731">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.circle-extra"></div> <div class="extra" id="Paper.circle-extra"></div>
@ -6263,7 +6263,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 2758 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2758">&#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 2763 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2763">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.image-extra"></div> <div class="extra" id="Paper.image-extra"></div>
@ -6385,7 +6385,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 2801 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2801">&#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 2806 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2806">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.ellipse-extra"></div> <div class="extra" id="Paper.ellipse-extra"></div>
@ -6476,7 +6476,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 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.path([pathString])<a href="#Paper.path" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2851 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2851">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.path-extra"></div> <div class="extra" id="Paper.path-extra"></div>
@ -6744,7 +6744,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 2877 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2877">&#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 2882 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2882">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.g-extra"></div> <div class="extra" id="Paper.g-extra"></div>
@ -6853,7 +6853,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 2883 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2883">&#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 2888 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2888">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.group-extra"></div> <div class="extra" id="Paper.group-extra"></div>
@ -6878,7 +6878,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 2916 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2916">&#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 2921 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2921">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.text-extra"></div> <div class="extra" id="Paper.text-extra"></div>
@ -6972,7 +6972,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 2944 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2944">&#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 2949 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2949">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.line-extra"></div> <div class="extra" id="Paper.line-extra"></div>
@ -7063,7 +7063,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 2973 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2973">&#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 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.polyline-extra"></div> <div class="extra" id="Paper.polyline-extra"></div>
@ -7175,7 +7175,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 2993 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2993">&#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 2998 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#2998">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.polygon-extra"></div> <div class="extra" id="Paper.polygon-extra"></div>
@ -7200,7 +7200,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 3046 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3046">&#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 3051 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3051">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.gradient-extra"></div> <div class="extra" id="Paper.gradient-extra"></div>
@ -7398,7 +7398,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 3062 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3062">&#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 3067 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3067">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.toString-extra"></div> <div class="extra" id="Paper.toString-extra"></div>
@ -7440,7 +7440,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 3080 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3080">&#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 3085 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3085">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Paper.clear-extra"></div> <div class="extra" id="Paper.clear-extra"></div>
@ -7465,7 +7465,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 3111 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3111">&#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 3116 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3116">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.ajax-extra"></div> <div class="extra" id="Snap.ajax-extra"></div>
@ -7569,7 +7569,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 3157 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3157">&#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 3162 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3162">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.load-extra"></div> <div class="extra" id="Snap.load-extra"></div>
@ -7618,7 +7618,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 3643 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3643">&#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 3648 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3648">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.getElementByPoint-extra"></div> <div class="extra" id="Snap.getElementByPoint-extra"></div>
@ -7703,7 +7703,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 3678 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3678">&#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 3683 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#3683">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.plugin-extra"></div> <div class="extra" id="Snap.plugin-extra"></div>
@ -11031,7 +11031,7 @@ prototypes). This allow you to extend anything you want.
<article id="Snap.path.getTotalLength"> <article id="Snap.path.getTotalLength">
<header> <header>
<h3 class="dr-method">Snap.path.getTotalLength(path)<a href="#Snap.path.getTotalLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1186 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1186">&#x27ad;</a></h3> <h3 class="dr-method">Snap.path.getTotalLength(path)<a href="#Snap.path.getTotalLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1143 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1143">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.path.getTotalLength-extra"></div> <div class="extra" id="Snap.path.getTotalLength-extra"></div>
@ -11091,7 +11091,7 @@ prototypes). This allow you to extend anything you want.
<article id="Snap.path.getPointAtLength"> <article id="Snap.path.getPointAtLength">
<header> <header>
<h3 class="dr-method">Snap.path.getPointAtLength(path, length)<a href="#Snap.path.getPointAtLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1203 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1203">&#x27ad;</a></h3> <h3 class="dr-method">Snap.path.getPointAtLength(path, length)<a href="#Snap.path.getPointAtLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1160 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1160">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.path.getPointAtLength-extra"></div> <div class="extra" id="Snap.path.getPointAtLength-extra"></div>
@ -11198,7 +11198,7 @@ prototypes). This allow you to extend anything you want.
<article id="Snap.path.getSubpath"> <article id="Snap.path.getSubpath">
<header> <header>
<h3 class="dr-method">Snap.path.getSubpath(path, from, to)<a href="#Snap.path.getSubpath" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1216 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1216">&#x27ad;</a></h3> <h3 class="dr-method">Snap.path.getSubpath(path, from, to)<a href="#Snap.path.getSubpath" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1173 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1173">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.path.getSubpath-extra"></div> <div class="extra" id="Snap.path.getSubpath-extra"></div>
@ -11264,7 +11264,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.getTotalLength"> <article id="Element.getTotalLength">
<header> <header>
<h3 class="dr-method">Element.getTotalLength()<a href="#Element.getTotalLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1230 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1230">&#x27ad;</a></h3> <h3 class="dr-method">Element.getTotalLength()<a href="#Element.getTotalLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1187 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1187">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.getTotalLength-extra"></div> <div class="extra" id="Element.getTotalLength-extra"></div>
@ -11306,7 +11306,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.getPointAtLength"> <article id="Element.getPointAtLength">
<header> <header>
<h3 class="dr-method">Element.getPointAtLength(length)<a href="#Element.getPointAtLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1251 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1251">&#x27ad;</a></h3> <h3 class="dr-method">Element.getPointAtLength(length)<a href="#Element.getPointAtLength" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1208 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1208">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.getPointAtLength-extra"></div> <div class="extra" id="Element.getPointAtLength-extra"></div>
@ -11410,7 +11410,7 @@ prototypes). This allow you to extend anything you want.
<article id="Element.getSubpath"> <article id="Element.getSubpath">
<header> <header>
<h3 class="dr-method">Element.getSubpath(from, to)<a href="#Element.getSubpath" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1266 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1266">&#x27ad;</a></h3> <h3 class="dr-method">Element.getSubpath(from, to)<a href="#Element.getSubpath" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1223 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1223">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Element.getSubpath-extra"></div> <div class="extra" id="Element.getSubpath-extra"></div>
@ -11473,7 +11473,7 @@ prototypes). This allow you to extend anything you want.
<article id="Snap.path.findDotsAtSegment"> <article id="Snap.path.findDotsAtSegment">
<header> <header>
<h3 class="dr-method">Snap.path.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t)<a href="#Snap.path.findDotsAtSegment" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1309 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1309">&#x27ad;</a></h3> <h3 class="dr-method">Snap.path.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t)<a href="#Snap.path.findDotsAtSegment" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1266 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1266">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.path.findDotsAtSegment-extra"></div> <div class="extra" id="Snap.path.findDotsAtSegment-extra"></div>
@ -11698,7 +11698,7 @@ Finds dot coordinates on the given cubic beziér curve at the given t
<article id="Snap.path.bezierBBox"> <article id="Snap.path.bezierBBox">
<header> <header>
<h3 class="dr-method">Snap.path.bezierBBox(…)<a href="#Snap.path.bezierBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1337 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1337">&#x27ad;</a></h3> <h3 class="dr-method">Snap.path.bezierBBox(…)<a href="#Snap.path.bezierBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1294 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1294">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.path.bezierBBox-extra"></div> <div class="extra" id="Snap.path.bezierBBox-extra"></div>
@ -11877,7 +11877,7 @@ Returns the bounding box of a given cubic beziér curve
<article id="Snap.path.isPointInsideBBox"> <article id="Snap.path.isPointInsideBBox">
<header> <header>
<h3 class="dr-method">Snap.path.isPointInsideBBox(bbox, x, y)<a href="#Snap.path.isPointInsideBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1350 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1350">&#x27ad;</a></h3> <h3 class="dr-method">Snap.path.isPointInsideBBox(bbox, x, y)<a href="#Snap.path.isPointInsideBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1307 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1307">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.path.isPointInsideBBox-extra"></div> <div class="extra" id="Snap.path.isPointInsideBBox-extra"></div>
@ -11944,7 +11944,7 @@ Returns <code>true</code> if given point is inside bounding box
<article id="Snap.path.isBBoxIntersect"> <article id="Snap.path.isBBoxIntersect">
<header> <header>
<h3 class="dr-method">Snap.path.isBBoxIntersect(bbox1, bbox2)<a href="#Snap.path.isBBoxIntersect" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1362 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1362">&#x27ad;</a></h3> <h3 class="dr-method">Snap.path.isBBoxIntersect(bbox1, bbox2)<a href="#Snap.path.isBBoxIntersect" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1319 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1319">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.path.isBBoxIntersect-extra"></div> <div class="extra" id="Snap.path.isBBoxIntersect-extra"></div>
@ -12008,7 +12008,7 @@ Returns <code>true</code> if two bounding boxes intersect
<article id="Snap.path.intersection"> <article id="Snap.path.intersection">
<header> <header>
<h3 class="dr-method">Snap.path.intersection(path1, path2)<a href="#Snap.path.intersection" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1386 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1386">&#x27ad;</a></h3> <h3 class="dr-method">Snap.path.intersection(path1, path2)<a href="#Snap.path.intersection" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1343 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1343">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.path.intersection-extra"></div> <div class="extra" id="Snap.path.intersection-extra"></div>
@ -12164,7 +12164,7 @@ Finds intersections of two paths
<article id="Snap.path.isPointInside"> <article id="Snap.path.isPointInside">
<header> <header>
<h3 class="dr-method">Snap.path.isPointInside(path, x, y)<a href="#Snap.path.isPointInside" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1402 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1402">&#x27ad;</a></h3> <h3 class="dr-method">Snap.path.isPointInside(path, x, y)<a href="#Snap.path.isPointInside" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1359 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1359">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.path.isPointInside-extra"></div> <div class="extra" id="Snap.path.isPointInside-extra"></div>
@ -12232,7 +12232,7 @@ Returns <code>true</code> if given point is inside a given closed path.
<article id="Snap.path.getBBox"> <article id="Snap.path.getBBox">
<header> <header>
<h3 class="dr-method">Snap.path.getBBox(path)<a href="#Snap.path.getBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1421 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1421">&#x27ad;</a></h3> <h3 class="dr-method">Snap.path.getBBox(path)<a href="#Snap.path.getBBox" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1378 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1378">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.path.getBBox-extra"></div> <div class="extra" id="Snap.path.getBBox-extra"></div>
@ -12361,7 +12361,7 @@ Returns the bounding box of a given path
<article id="Snap.path.toRelative"> <article id="Snap.path.toRelative">
<header> <header>
<h3 class="dr-method">Snap.path.toRelative(path)<a href="#Snap.path.toRelative" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1433 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1433">&#x27ad;</a></h3> <h3 class="dr-method">Snap.path.toRelative(path)<a href="#Snap.path.toRelative" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1390 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1390">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.path.toRelative-extra"></div> <div class="extra" id="Snap.path.toRelative-extra"></div>
@ -12422,7 +12422,7 @@ Converts path coordinates into relative values
<article id="Snap.path.toAbsolute"> <article id="Snap.path.toAbsolute">
<header> <header>
<h3 class="dr-method">Snap.path.toAbsolute(path)<a href="#Snap.path.toAbsolute" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1444 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1444">&#x27ad;</a></h3> <h3 class="dr-method">Snap.path.toAbsolute(path)<a href="#Snap.path.toAbsolute" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1401 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1401">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.path.toAbsolute-extra"></div> <div class="extra" id="Snap.path.toAbsolute-extra"></div>
@ -12483,7 +12483,7 @@ Converts path coordinates into absolute values
<article id="Snap.path.toCubic"> <article id="Snap.path.toCubic">
<header> <header>
<h3 class="dr-method">Snap.path.toCubic(pathString)<a href="#Snap.path.toCubic" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1455 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1455">&#x27ad;</a></h3> <h3 class="dr-method">Snap.path.toCubic(pathString)<a href="#Snap.path.toCubic" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1412 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1412">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.path.toCubic-extra"></div> <div class="extra" id="Snap.path.toCubic-extra"></div>
@ -12544,7 +12544,7 @@ Converts path to a new path where all segments are cubic beziér curves
<article id="Snap.path.map"> <article id="Snap.path.map">
<header> <header>
<h3 class="dr-method">Snap.path.map(path, matrix)<a href="#Snap.path.map" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1465 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1465">&#x27ad;</a></h3> <h3 class="dr-method">Snap.path.map(path, matrix)<a href="#Snap.path.map" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 1422 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#1422">&#x27ad;</a></h3>
</header> </header>
<section> <section>
<div class="extra" id="Snap.path.map-extra"></div> <div class="extra" id="Snap.path.map-extra"></div>

View File

@ -1572,7 +1572,12 @@ function arrayFirstValue(arr) {
elproto.getBBox = function (isWithoutTransform) { elproto.getBBox = function (isWithoutTransform) {
var el = this; var el = this;
if (el.type == "use") { if (el.type == "use") {
el = el.original; if (el.original) {
el = el.original;
} else {
var href = el.attr("xlink:href");
el = glob.doc.getElementById(href.substring(href.indexOf("#") + 1));
}
} }
if (el.removed) { if (el.removed) {
return {}; return {};