cjgammon 2013-10-18 09:32:45 -07:00
commit b431a6560f
12 changed files with 787 additions and 458 deletions

View File

@ -1,197 +0,0 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="copyright" content="Copyright © 2013 Adobe Systems Incorporated. All rights reserved.
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.">
<title>Snap</title>
<script src="../../dist/snap.svg-min.js"></script>
<script>
window.onload = function () {
var croc = Snap.select("#crocodile"),
head = croc.select("#upper-head"),
jaw = croc.select("#upper-jaw"),
symbol = croc.select("#symbol"),
timer;
var pivots = [
[44, 147],
[92, 126]
];
function close() {
clearTimeout(timer);
head.animate({
transform: "r" + [8, pivots[0]]
}, 500, mina.backin);
jaw.animate({
transform: "r" + [37, pivots[1]]
}, 500, mina.backin);
timer = setTimeout(function () {
symbol.animate({
transform: "t-70,40r40"
}, 100);
}, 400);
}
function open() {
clearTimeout(timer);
head.animate({
transform: "r" + [0, pivots[0]]
}, 700, mina.elastic);
jaw.animate({
transform: "r" + [0, pivots[1]]
}, 700, mina.elastic);
symbol.animate({
transform: "t0,0r0"
}, 500, mina.elastic);
}
timer = setTimeout(close, 500);
croc.hover(open,
function () {
timer = setTimeout(close, 200);
}
);
};
</script>
</head>
<body>
<svg version="1.1" id="crocodile" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="260px" height="250px">
<g>
<path id="symbol" opacity="0.2" fill="#848383" d="M185.631,140.915
l5.02,10.86l8.145-3.765l-5.02-10.86L185.631,140.915zM246.828,109.341
l-47.613,25.306l5.02,10.86l50.123-19.876L246.828,109.341z"/>
<g id="head">
<polygon fill="#09B39C" points="44.613,146.703 26.665,140.721
8.718,146.703 -0.252,146.703 -0.252,206.523 44.613,206.523
119.387,206.523 119.387,167.64"/>
<polygon opacity="0.2" fill="#FFFFFF" points="-0.252,146.703
11.712,170.631 26.667,140.721 8.721,146.703"/>
<polyline opacity="0.2" fill="#FFFFFF" points="8.718,146.703
20.685,152.685 26.665,140.721"/>
<polygon opacity="0.2" fill="#FFFFFF" points="44.613,146.703
53.613,163.667 17.694,143.712 26.667,140.721"/>
</g>
<g id="upper-head">
<g id="upper-jaw">
<g>
<path id="upper-teeth" fill="#E0CAB1" d="M151.174,
129.382l14.913,6.086l-6.602-14.691L151.174,129.382z
M138.707,142.292l14.914,6.086l-6.603-14.692
L138.707,142.292zM126.241,155.201l14.913,6.086l-6.602
-14.692L126.241,155.201zM163.64,116.474l14.913,6.085
l-6.603-14.692L163.64,116.474zM176.106,103.564
l14.913,6.086l-6.602-14.692L176.106,103.564z
M188.572,90.655l14.914,6.085l-6.602-14.691
L188.572,90.655zM201.039,77.746l14.913,6.085
L209.35,69.14L201.039,77.746z M221.816,56.23
l-8.311,8.607l14.913,6.085L221.816,56.23z"/>
<path opacity="0.4" fill="#FFFFFF" d="M155.329,125.08
l10.758,10.388l-6.602-14.691L155.329,125.08z
M142.863,137.989l10.758,10.389l-6.603-14.692L142.863,
137.989zM130.396,150.898l10.758,10.389l-6.602-14.692
L130.396,150.898zM167.796,112.171l10.757,10.388
l-6.603-14.692L167.796,112.171zM180.261,99.261
l10.758,10.389l-6.602-14.692L180.261,99.261zM192.728,
86.352l10.758,10.388l-6.602-14.691L192.728,86.352z
M205.195,73.443l10.757,10.388L209.35,69.14L205.195,
73.443zM221.816,56.23l-4.156,4.303l10.758,10.389
L221.816,56.23z"/>
</g>
<polygon fill="#09B39C" points="215.135,33 200.18,33
197.189,46.955 92,125 88.355,171.706 106.387,180.64
236.072,47.955"/>
<polygon opacity="0.2" fill="#FFFFFF" points="92,125
97.423,150.703 197.189,46.955"/>
<polyline opacity="0.2" fill="#FFFFFF" points="197.189,
46.955185.207,76.892 92,125"/>
<polygon opacity="0.2" fill="#FFFFFF" points="200.18,33
236.072,47.955 215.135,33"/>
<polygon opacity="0.2" fill="#FFFFFF" points="197.189,
46.955 215.135,33 200.18,33"/>
</g>
<polygon fill="#09B39C" points="92,125 65.55,126.757
44.613,146.703 44.613,176.523 119.387,176.523 119.387,167.64
107.897,156.377"/>
<polygon opacity="0.2" fill="#FFFFFF" points="92,125
102.423,145.703 65.55,126.757"/>
<polygon opacity="0.2" fill="#FFFFFF" points="44.613,146.703
102.423,145.703 92,125 65.55,126.757"/>
<polygon id="eye_1_" fill="#FFFFFF" points="71.532,145.703
83.495,139.721 95.459,145.703 80.505,154.676"/>
<polygon opacity="0.2" fill="#FFFFFF" points="44.613,146.703
44.613,158.667 92,125 65.55,126.757"/>
</g>
<g id="bottom-jaw">
<g>
<polygon fill="#E0CAB1" points="152.531,185.586
158.513,170.631 164.495,185.586"/>
<polygon opacity="0.4" fill="#FFFFFF" points="164.495,
185.586 158.513,170.631 158.513,185.586"/>
</g>
<g>
<polygon fill="#E0CAB1" points="170.477,185.586
176.459,170.631 182.441,185.586"/>
<polygon opacity="0.4" fill="#FFFFFF" points="182.441,
185.586 176.459,170.631 176.459,185.586"/>
</g>
<g>
<polygon fill="#E0CAB1" points="188.423,185.586
194.405,170.631 200.387,185.586"/>
<polygon opacity="0.4" fill="#FFFFFF" points="200.387,
185.586 194.405,170.631 194.405,185.586"/>
</g>
<g>
<polygon fill="#E0CAB1" points="206.369,185.586
212.351,170.631 218.333,185.586"/>
<polygon opacity="0.4" fill="#FFFFFF" points="218.333,
185.586 212.351,170.631 212.351,185.586"/>
</g>
<g>
<polygon fill="#E0CAB1" points="224.315,185.586
230.297,170.631 236.279,185.586"/>
<polygon opacity="0.4" fill="#FFFFFF" points="236.279,
185.586 230.297,170.631 230.297,185.586"/>
</g>
<polygon fill="#E0CAB1" points="148.54,179.604 119.596,167.64
109.657,167.64 103.675,167.64 91.711,167.64 79.747,179.604
-4,200.541 -4,206.523 79.747,206.523 156.522,206.523
187.432,198.55 235.288,189.577 244.252,179.604"/>
<polygon opacity="0.3" fill="#FFFFFF" points="119.594,167.64
91.711,167.64 79.747,179.604"/>
<polygon opacity="0.3" fill="#FFFFFF" points="91.711,167.64
79.747,206.523 79.747,179.604"/>
<polygon opacity="0.1" fill="#534741" points="235.288,189.577
160.513,195.559 115.639,206.523 156.522,206.523
187.432,198.55"/>
<polygon opacity="0.1" fill="#534741" points="187.432,198.55
160.513,195.559 156.522,206.523 156.522,206.523"/>
<polygon opacity="0.3" fill="#FFFFFF" points="-4,200.541
46.847,194.559 79.747,179.604"/>
</g>
</g>
</svg>
</body>
</html>

View File

@ -4,6 +4,9 @@
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="1000px" height="800px" viewBox="0 0 1000 800" enable-background="new 0 0 1000 800" xml:space="preserve">
<g id="Layer_1_1_">
<defs>
<path id="textline" fill="none" d="M474.432,344.553c7.165-5.251,16.004-8.351,25.568-8.351c9.294,0,17.905,2.928,24.958,7.913"/>
</defs>
<g>
<polygon fill="#FFFFFF" points="358,707.5 358,686.086 418,626.086 418,303.5 580,303.5 580,626.086 640,686.086 640,707.5 "/>
<path fill="#60544F" d="M579,304.5v322l60,60v20H359v-20l60-60v-322H579 M581,302.5h-2H419h-2v2v321.172l-59.414,59.414
@ -62,103 +65,47 @@
M500,318.5c-33.689,0-61,27.311-61,61s27.311,61,61,61s61-27.311,61-61S533.689,318.5,500,318.5L500,318.5z"/>
</g>
<polyline id="arrow" fill="#60544F" points="496.83,348.346 500,339.894 503.17,348.346 "/>
<g>
<g>
<g>
<defs>
<circle id="SVGID_2_" cx="500" cy="379.5" r="61"/>
</defs>
<clipPath id="SVGID_3_">
<use xlink:href="#SVGID_2_" overflow="visible"/>
</clipPath>
<line clip-path="url(#SVGID_3_)" fill="none" stroke="#60544F" stroke-miterlimit="10" x1="498.856" y1="382.55" x2="498.856" y2="442.025"/>
</g>
</g>
<g>
<g>
<defs>
<circle id="SVGID_4_" cx="500" cy="379.5" r="61"/>
</defs>
<clipPath id="SVGID_5_">
<use xlink:href="#SVGID_4_" overflow="visible"/>
</clipPath>
<line clip-path="url(#SVGID_5_)" fill="none" stroke="#60544F" stroke-miterlimit="10" x1="506.985" y1="376.834" x2="440.119" y2="398.56"/>
</g>
</g>
<g>
<g>
<defs>
<circle id="SVGID_6_" cx="500" cy="379.5" r="61"/>
</defs>
<clipPath id="SVGID_7_">
<use xlink:href="#SVGID_6_" overflow="visible"/>
</clipPath>
<line clip-path="url(#SVGID_7_)" fill="none" stroke="#60544F" stroke-miterlimit="10" x1="503.882" y1="385.088" x2="463.047" y2="328.883"/>
</g>
</g>
<g>
<g>
<defs>
<circle id="SVGID_8_" cx="500" cy="379.5" r="61"/>
</defs>
<clipPath id="SVGID_9_">
<use xlink:href="#SVGID_8_" overflow="visible"/>
</clipPath>
<line clip-path="url(#SVGID_9_)" fill="none" stroke="#60544F" stroke-miterlimit="10" x1="495.806" y1="378.044" x2="558.949" y2="398.56"/>
</g>
</g>
<g>
<g>
<defs>
<circle id="SVGID_10_" cx="500" cy="379.5" r="61"/>
</defs>
<clipPath id="SVGID_11_">
<use xlink:href="#SVGID_10_" overflow="visible"/>
</clipPath>
<line clip-path="url(#SVGID_11_)" fill="none" stroke="#60544F" stroke-miterlimit="10" x1="495.187" y1="385.088" x2="536.022" y2="328.883"/>
</g>
</g>
</g>
<radialGradient id="SVGID_12_" cx="542" cy="174.72" r="35.99" gradientTransform="matrix(1 0 0 1 -42 206)" gradientUnits="userSpaceOnUse">
<g>
<path fill="none" stroke="#60544F" d="M500,379.5v61" id="separator"/>
<use xlink:href="#separator" transform="rotate(72, 500, 379.5)"/>
<use xlink:href="#separator" transform="rotate(144, 500, 379.5)"/>
<use xlink:href="#separator" transform="rotate(216, 500, 379.5)"/>
<use xlink:href="#separator" transform="rotate(288, 500, 379.5)"/>
</g>
<text fill="#423733" style="font: 400 11px Source Sans Pro, source-sans-pro, sans-serif" text-anchor="middle">
<textPath xlink:href="#textline" startOffset="50%">Americano</textPath>
</text>
<text transform="rotate(72, 500, 379.5)" fill="#423733" style="font: 400 11px Source Sans Pro, source-sans-pro, sans-serif" text-anchor="middle">
<textPath xlink:href="#textline" startOffset="50%">Latté</textPath>
</text>
<text transform="rotate(144, 500, 379.5)" fill="#423733" style="font: 400 11px Source Sans Pro, source-sans-pro, sans-serif" text-anchor="middle">
<textPath xlink:href="#textline" startOffset="50%">Mocha</textPath>
</text>
<text transform="rotate(216, 500, 379.5)" fill="#423733" style="font: 400 11px Source Sans Pro, source-sans-pro, sans-serif" text-anchor="middle">
<textPath xlink:href="#textline" startOffset="50%">Mochiatto</textPath>
</text>
<text transform="rotate(288, 500, 379.5)" fill="#423733" style="font: 400 11px Source Sans Pro, source-sans-pro, sans-serif" text-anchor="middle">
<textPath xlink:href="#textline" startOffset="50%">Espresso</textPath>
</text>
<radialGradient id="SVGID_12_" cx="542" cy="174.72" r="35.99" gradientTransform="matrix(1 0 0 1 -42 206)" gradientUnits="userSpaceOnUse">
<stop offset="0.8139" style="stop-color:#60544F"/>
<stop offset="1" style="stop-color:#60544F;stop-opacity:0"/>
</radialGradient>
<circle opacity="0.5" fill="url(#SVGID_12_)" enable-background="new " cx="500" cy="380.72" r="35.99"/>
<g>
<path fill="#FFFFFF" d="M500,411.94c-17.888,0-32.44-14.553-32.44-32.44s14.553-32.44,32.44-32.44
c17.887,0,32.44,14.553,32.44,32.44S517.888,411.94,500,411.94z"/>
<path fill="#60544F" d="M500,347.56c17.612,0,31.94,14.328,31.94,31.94s-14.328,31.94-31.94,31.94s-31.94-14.328-31.94-31.94
S482.388,347.56,500,347.56 M500,346.56c-18.192,0-32.94,14.748-32.94,32.94s14.748,32.94,32.94,32.94s32.94-14.748,32.94-32.94
S518.192,346.56,500,346.56L500,346.56z"/>
</g>
<circle opacity="0.5" fill="url(#SVGID_12_)" cx="500" cy="380.72" r="35.99"/>
<g opacity="0">
<path id="mocha-area" d="M500,379.5v61A61,61,0,0,0,558.01,398.35z"/>
<path id="mochiatto-area" d="M500,379.5v61A61,61,0,0,0,558.01,398.35z" transform="rotate(72, 500, 379.5)"/>
<path id="espresso-area" d="M500,379.5v61A61,61,0,0,0,558.01,398.35z" transform="rotate(144, 500, 379.5)"/>
<path id="americano-area" d="M500,379.5v61A61,61,0,0,0,558.01,398.35z" transform="rotate(216, 500, 379.5)"/>
<path id="latte-area" d="M500,379.5v61A61,61,0,0,0,558.01,398.35z" transform="rotate(288, 500, 379.5)"/>
</g>
<circle fill="#fff" stroke="#60544F" cx="500" cy="379.5" r="33"/>
<circle id="dot" fill="none" stroke="#60544F" stroke-miterlimit="10" cx="500" cy="355.71" r="3.66"/>
<circle id="knob" fill="none" cx="500" cy="379.5" r="43.298"/>
<path id="textline" fill="none" d="M474.432,344.553c7.165-5.251,16.004-8.351,25.568-8.351c9.294,0,17.905,2.928,24.958,7.913"/>
<text fill="#423733" style="font: 400 11px Source Sans Pro, source-sans-pro, sans-serif" text-anchor="middle">
<textPath xlink:href="#textline" startOffset="50%">Americano</textPath>
</text>
<text transform="rotate(72, 500, 379.5)" fill="#423733" style="font: 400 11px Source Sans Pro, source-sans-pro, sans-serif" text-anchor="middle">
<textPath xlink:href="#textline" startOffset="50%">Latté</textPath>
</text>
<text transform="rotate(144, 500, 379.5)" fill="#423733" style="font: 400 11px Source Sans Pro, source-sans-pro, sans-serif" text-anchor="middle">
<textPath xlink:href="#textline" startOffset="50%">Mocha</textPath>
</text>
<text transform="rotate(216, 500, 379.5)" fill="#423733" style="font: 400 11px Source Sans Pro, source-sans-pro, sans-serif" text-anchor="middle">
<textPath xlink:href="#textline" startOffset="50%">Mochiatto</textPath>
</text>
<text transform="rotate(288, 500, 379.5)" fill="#423733" style="font: 400 11px Source Sans Pro, source-sans-pro, sans-serif" text-anchor="middle">
<textPath xlink:href="#textline" startOffset="50%">Espresso</textPath>
</text>
<circle fill="#FFFFFF" stroke="#60544F" stroke-miterlimit="10" cx="439" cy="318.5" r="2"/>
<circle fill="#FFFFFF" stroke="#60544F" stroke-miterlimit="10" cx="561" cy="318.5" r="2"/>
<circle fill="#FFFFFF" stroke="#60544F" stroke-miterlimit="10" cx="561" cy="440.5" r="2"/>
<circle fill="#FFFFFF" stroke="#60544F" stroke-miterlimit="10" cx="439" cy="440.5" r="2"/>
<circle id="knob" fill="none" cx="500" cy="379.5" r="33"/>
<circle fill="#FFFFFF" stroke="#60544F" stroke-miterlimit="10" cx="439" cy="318.5" r="2"/>
<circle fill="#FFFFFF" stroke="#60544F" stroke-miterlimit="10" cx="561" cy="318.5" r="2"/>
<circle fill="#FFFFFF" stroke="#60544F" stroke-miterlimit="10" cx="561" cy="440.5" r="2"/>
<circle fill="#FFFFFF" stroke="#60544F" stroke-miterlimit="10" cx="439" cy="440.5" r="2"/>
<g id="pie-chart">
<circle fill="#D6EDEE" cx="735" cy="560" r="35"/>
<path fill="#60544F" d="M746.089,527.343c-4.258-1.827-8.947-2.843-13.874-2.843v35.215L746.089,527.343z"/>

Before

Width:  |  Height:  |  Size: 20 KiB

After

Width:  |  Height:  |  Size: 18 KiB

View File

@ -98,6 +98,21 @@
closed,
grp = s.g().insertBefore(tap);
f.select("#pie-chart").remove();
f.select("#americano-area").click(function () {
chosen(0);
});
f.select("#latte-area").click(function () {
chosen(72);
});
f.select("#mocha-area").click(function () {
chosen(144);
});
f.select("#mochiatto-area").click(function () {
chosen(216);
});
f.select("#espresso-area").click(function () {
chosen(288);
});
x = +top.attr("cx");
y = +top.attr("cy");
R = +top.attr("rx");
@ -130,25 +145,31 @@
lastAngle = a;
}, function (x, y) {
startAngle = Snap.angle(knobcx, knobcy, x, y);
lastAngle = angle;
dot.stop();
arr.stop();
}, function () {
angle = lastAngle;
var a = Snap.snapTo(72, angle, 36);
chosen(a);
});
function chosen(a) {
a = (a + 1080) % 360;
angle = a;
var to = "r" + [a, knobcx, knobcy];
dot.animate({
transform: "r" + [a, knobcx, knobcy]
transform: to
}, 1000, mina.elastic);
arr.animate({
transform: "r" + [a, knobcx, knobcy]
transform: to
}, 1000, mina.elastic, function () {
angle = (a + 1080) % 360;
closeCup(function () {
types[angle]();
types[a]();
pour();
pieShow();
});
});
});
}
grp.path(outline(0, h)).attr("class", "outline");
var o3 = (h - 70) / 3,

View File

@ -0,0 +1,164 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="copyright" content="Copyright © 2013 Adobe Systems Incorporated. All rights reserved.
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.">
<title>Snap</title>
<link rel="stylesheet" href="style.css">
<script src="../../dist/snap.svg-min.js"></script>
<script>
window.onload = function () {
var croc = Snap.select("#crocodile"),
head = croc.select("#upper-head"),
jaw = croc.select("#upper-jaw"),
symbol = croc.select("#symbol"),
timer;
var pivots = [
[44, 147],
[92, 126]
];
function close() {
clearTimeout(timer);
head.animate({
transform: "r" + [8, pivots[0]]
}, 500, mina.backin);
jaw.animate({
transform: "r" + [37, pivots[1]]
}, 500, mina.backin);
timer = setTimeout(function () {
symbol.animate({
transform: "t-70,40r40"
}, 100);
}, 400);
}
function open() {
clearTimeout(timer);
head.animate({
transform: "r" + [0, pivots[0]]
}, 700, mina.elastic);
jaw.animate({
transform: "r" + [0, pivots[1]]
}, 700, mina.elastic);
symbol.animate({
transform: "t0,0r0"
}, 500, mina.elastic);
}
timer = setTimeout(close, 50);
croc.hover(open,
function () {
timer = setTimeout(close, 200);
}
);
};
</script>
</head>
<body>
<svg version="1.1" id="crocodile" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="312px" height="300px" viewBox="0 0 260 250" enable-background="new 0 0 260 250" xml:space="preserve">
<g>
<path id="symbol" opacity="0.2" fill="#848383" enable-background="new " d="M185.631,140.915l5.02,10.86l8.145-3.765
l-5.02-10.86L185.631,140.915z M246.828,109.341l-47.613,25.306l5.02,10.86l50.123-19.876L246.828,109.341z"/>
<g id="head">
<polygon fill="#09B39C" points="44.613,146.703 26.665,140.721 8.718,146.703 -0.252,146.703 -0.252,206.523 44.613,206.523
119.387,206.523 119.387,167.64 "/>
<polygon opacity="0.2" fill="#FFFFFF" enable-background="new " points="-0.252,146.703 11.712,170.631 26.667,140.721
8.721,146.703 "/>
<polyline opacity="0.2" fill="#FFFFFF" enable-background="new " points="8.718,146.703 20.685,152.685 26.665,140.721 "/>
<polygon opacity="0.2" fill="#FFFFFF" enable-background="new " points="44.613,146.703 53.613,163.667 17.694,143.712
26.667,140.721 "/>
</g>
<g id="upper-head">
<g id="upper-jaw">
<g>
<path id="upper-teeth" fill="#E0CAB1" d="M151.174,129.382l14.913,6.086l-6.602-14.691L151.174,129.382z M138.707,142.292
l14.914,6.086l-6.603-14.692L138.707,142.292z M126.241,155.201l14.913,6.086l-6.602-14.692L126.241,155.201z M163.64,116.474
l14.913,6.085l-6.603-14.692L163.64,116.474z M176.106,103.564l14.913,6.086l-6.602-14.692L176.106,103.564z M188.572,90.655
l14.914,6.085l-6.602-14.691L188.572,90.655z M201.039,77.746l14.913,6.085L209.35,69.14L201.039,77.746z M221.816,56.23
l-8.311,8.607l14.913,6.085L221.816,56.23z"/>
<path opacity="0.4" fill="#FFFFFF" enable-background="new " d="M155.329,125.08l10.758,10.388l-6.602-14.691L155.329,125.08
z M142.863,137.989l10.758,10.389l-6.603-14.692L142.863,137.989z M130.396,150.898l10.758,10.389l-6.602-14.692
L130.396,150.898z M167.796,112.171l10.757,10.388l-6.603-14.692L167.796,112.171z M180.261,99.261l10.758,10.389l-6.602-14.692
L180.261,99.261z M192.728,86.352l10.758,10.388l-6.602-14.691L192.728,86.352z M205.195,73.443l10.757,10.388L209.35,69.14
L205.195,73.443z M221.816,56.23l-4.156,4.303l10.758,10.389L221.816,56.23z"/>
</g>
<polygon fill="#09B39C" points="215.135,33 200.18,33 197.189,46.955 92,125 88.355,171.706 106.387,180.64 236.072,47.955
"/>
<polygon opacity="0.2" fill="#FFFFFF" enable-background="new " points="92,125 97.423,150.703 197.189,46.955 "/>
<line opacity="0.2" fill="#FFFFFF" enable-background="new " x1="197.189" y1="46.955" x2="92" y2="125"/>
<polygon opacity="0.2" fill="#FFFFFF" enable-background="new " points="200.18,33 236.072,47.955 215.135,33 "/>
<polygon opacity="0.2" fill="#FFFFFF" enable-background="new " points="197.189,46.955 215.135,33 200.18,33 "/>
</g>
<polygon fill="#09B39C" points="92,125 65.55,126.757 44.613,146.703 44.613,176.523 119.387,176.523 119.387,167.64
107.897,156.377 "/>
<polygon opacity="0.2" fill="#FFFFFF" enable-background="new " points="92,125 102.423,145.703 65.55,126.757 "/>
<polygon opacity="0.2" fill="#FFFFFF" enable-background="new " points="44.613,146.703 102.423,145.703 92,125 65.55,126.757
"/>
<polygon id="eye_1_" fill="#FFFFFF" points="71.532,145.703 83.495,139.721 95.459,145.703 80.505,154.676 "/>
<polygon opacity="0.2" fill="#FFFFFF" enable-background="new " points="44.613,146.703 44.613,158.667 92,125 65.55,126.757
"/>
</g>
<g id="bottom-jaw">
<g>
<polygon fill="#E0CAB1" points="152.531,185.586 158.513,170.631 164.495,185.586 "/>
<polygon opacity="0.4" fill="#FFFFFF" enable-background="new " points="164.495,185.586 158.513,170.631 158.513,185.586
"/>
</g>
<g>
<polygon fill="#E0CAB1" points="170.477,185.586 176.459,170.631 182.441,185.586 "/>
<polygon opacity="0.4" fill="#FFFFFF" enable-background="new " points="182.441,185.586 176.459,170.631 176.459,185.586
"/>
</g>
<g>
<polygon fill="#E0CAB1" points="188.423,185.586 194.405,170.631 200.387,185.586 "/>
<polygon opacity="0.4" fill="#FFFFFF" enable-background="new " points="200.387,185.586 194.405,170.631 194.405,185.586
"/>
</g>
<g>
<polygon fill="#E0CAB1" points="206.369,185.586 212.351,170.631 218.333,185.586 "/>
<polygon opacity="0.4" fill="#FFFFFF" enable-background="new " points="218.333,185.586 212.351,170.631 212.351,185.586
"/>
</g>
<g>
<polygon fill="#E0CAB1" points="224.315,185.586 230.297,170.631 236.279,185.586 "/>
<polygon opacity="0.4" fill="#FFFFFF" enable-background="new " points="236.279,185.586 230.297,170.631 230.297,185.586
"/>
</g>
<polygon fill="#E0CAB1" points="148.54,179.604 119.596,167.64 109.657,167.64 103.675,167.64 91.711,167.64 79.747,179.604
0,200.541 0,206.523 79.747,206.523 156.522,206.523 187.432,198.55 235.288,189.577 244.252,179.604 "/>
<polygon opacity="0.3" fill="#FFFFFF" enable-background="new " points="119.594,167.64 91.711,167.64 79.747,179.604 "/>
<polygon opacity="0.3" fill="#FFFFFF" enable-background="new " points="91.711,167.64 79.747,206.523 79.747,179.604 "/>
<polygon opacity="0.1" fill="#534741" enable-background="new " points="235.288,189.577 160.513,195.559 115.639,206.523
156.522,206.523 187.432,198.55 "/>
<polygon opacity="0.1" fill="#534741" enable-background="new " points="187.432,198.55 160.513,195.559 156.522,206.523
156.522,206.523 "/>
<polygon opacity="0.3" fill="#FFFFFF" enable-background="new " points="0,200.541 46.847,194.559 79.747,179.604 "/>
</g>
</g>
</svg>
</body>
</html>

View File

@ -0,0 +1,327 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="copyright" content="Copyright © 2013 Adobe Systems Incorporated. All rights reserved.
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.">
<title>Snap</title>
<script src="../../dist/snap.svg-min.js"></script>
<link rel="stylesheet" href="style.css">
<script>
window.onload = function () {
var diagramgroup = Snap.select("#crocodile-2"),
elements = {},
elementkeys = ['map', 'pie', 'eye'],
diagramtimer = [],
animating = {},
cleartimers = {},
i = 0, j = 0;
function show(key) {
if (animating[key]) return;
clearTimeout(cleartimers[key]);
animating[key] = true;
var element = elements[key],
x = element[0].getBBox().x,
offset = x/2 + 25;
element[0].attr({
transform: "translate("+offset+",80) scale(0.5, 0.5)"
});
setTimeout(function() {
element[0].animate({opacity:1,transform:""}, 500, mina.elastic);
}, 50);
element[1].animate({opacity:0.25}, 400);
setTimeout(function(){animating[key] = false}, 550);
}
function showAll() {
j = 0;
function cycle() {
show(elementkeys[j]);
j++;
if (j < elementkeys.length) setTimeout(cycle, 200);
}
cycle();
}
function hoverIn() {
show( this.node.id.replace('hit-', '') );
}
for (i = 0; i < elementkeys.length; i++) {
var key = elementkeys[i],
diagram = diagramgroup.select("#diagram-" + key).attr({opacity:0}),
path = diagramgroup.select("#path-" + key).attr({opacity:0}),
hitarea = diagramgroup.select("#hit-" + key);
hitarea.hover(hoverIn);
elements[key] = [diagram, path];
}
diagramtimer = setTimeout(showAll, 250);
};
</script>
</head>
<body>
<svg version="1.1" id="crocodile-2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" width="375px" height="300px" viewBox="0 0 500 400" enable-background="new 0 0 500 400" xml:space="preserve">
<g id="croc">
<linearGradient id="SVGID_1_" gradientUnits="userSpaceOnUse" x1="-352.022" y1="820.576" x2="-352.022" y2="919.5" gradientTransform="matrix(-1 0 0 1 79 -537.5)">
<stop offset="0" style="stop-color:#000000;stop-opacity:0.25"/>
<stop offset="0.7074" style="stop-color:#000000;stop-opacity:0"/>
</linearGradient>
<polygon fill="url(#SVGID_1_)" points="828.78,382 766.953,320.172 424.839,283.076 33.264,309.868 105.396,382 "/>
<polygon fill="#00A99D" points="717.49,299.563 639.175,287.198 597.957,274.832 581.47,274.832 527.886,258.345 499.033,250.101
424.839,237.735 363.012,237.735 330.037,245.979 272.331,250.101 255.844,245.979 218.747,254.223 198.138,254.223
169.285,262.466 169.02,262.528 168.718,262.466 150.365,258.345 132.031,258.345 120.695,270.535 49.639,291.805 39.562,289.472
33.264,295.441 33.264,309.413 37.204,309.346 43.291,316.495 72.885,318.333 91.381,320.172 137.62,319.364 153.768,319.364
161.041,320.172 210.503,320.172 198.138,332.538 239.356,332.538 247.6,328.416 251.722,320.172 276.453,320.172 325.915,324.294
381.312,320.337 375.377,324.294 363.012,332.538 416.596,332.538 424.839,328.416 430.335,320.172 441.327,320.172
503.154,316.05 532.007,320.172 614.437,324.294 635.066,324.294 672.15,320.172 766.953,320.172 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="346.524,258.345 330.037,245.979 363.012,237.735 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="717.49,299.563 721.612,311.929 655.663,303.685
597.957,291.319 569.104,295.441 494.911,274.832 499.033,250.101 527.886,258.345 581.47,274.832 597.957,274.832
639.175,287.198 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="499.033,250.101 433.083,250.101 424.839,237.735 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="527.885,258.345 494.911,274.832 433.083,250.101
363.012,237.735 424.839,237.735 499.033,250.101 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="597.957,274.832 597.957,291.319 581.47,274.832 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="527.885,258.345 569.104,295.441 581.47,274.832 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="527.885,258.345 494.911,274.832 437.205,262.466
420.718,274.832 346.524,258.345 272.331,250.101 330.037,245.979 363.012,237.735 424.839,237.735 499.033,250.101 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="433.083,250.101 420.718,274.832 346.524,258.345
309.428,278.954 272.331,262.466 255.844,245.979 272.331,250.101 330.037,245.979 363.012,237.735 424.839,237.735
499.033,250.101 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="272.331,250.101 272.331,262.466 218.747,254.223
255.844,245.979 "/>
<polygon opacity="0.2" fill="#FFFFFF" enable-background="new " points="120.695,270.534 123.127,285.425 49.638,291.805 "/>
<polyline opacity="0.2" fill="#FFFFFF" enable-background="new " points="49.638,291.805 62.343,298.568 120.695,270.534 "/>
<polygon opacity="0.2" fill="#FFFFFF" enable-background="new " points="120.695,270.534 120.695,270.534 123.127,285.425
132.031,258.345 "/>
<polygon opacity="0.2" fill="#FFFFFF" enable-background="new " points="150.365,258.345 123.127,285.425 120.695,270.534
132.031,258.345 "/>
<polygon fill="#FFFFFF" points="141.617,267.138 137.495,271.26 145.739,271.26 149.861,268.676 "/>
<polygon opacity="0.2" fill="#FFFFFF" enable-background="new " points="150.365,258.345 168.718,262.642 119.911,270.71
132.031,258.345 "/>
<polygon opacity="0.2" fill="#FFFFFF" enable-background="new " points="49.638,291.805 33.264,295.441 39.562,289.472 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="161.041,311.929 140.432,299.563 107.457,299.563
123.945,295.441 144.554,295.441 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="144.554,295.441 123.945,295.441 140.432,299.563 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="255.844,245.979 218.747,254.223 218.747,262.466
198.138,254.223 218.747,254.223 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="218.747,254.223 218.747,262.466 169.285,270.71
132.598,258.345 152.798,258.345 169.285,262.466 198.138,254.223 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="330.037,245.979 272.331,262.466 247.6,278.954
218.747,262.466 169.285,283.076 169.285,262.466 198.138,254.223 218.747,254.223 255.844,245.979 272.331,250.101 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="259.966,278.954 247.6,291.319 235.235,287.198 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="280.575,287.198 247.6,291.319 226.991,316.05
235.235,287.198 259.966,278.954 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="210.503,320.172 206.382,332.538 198.138,332.538 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="226.991,316.05 235.235,320.172 210.503,320.172 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="288.819,299.563 280.575,287.198 259.966,278.954
235.235,287.198 247.6,291.319 259.966,278.954 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="235.235,287.198 235.235,320.172 218.747,332.538
206.382,332.538 198.138,332.538 210.503,320.172 226.991,316.05 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="466.058,270.71 445.449,287.198 433.083,278.954 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="420.718,287.198 445.449,287.198 486.667,287.198
466.058,270.71 433.083,278.954 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="404.23,311.929 445.449,287.198 466.058,270.71
433.083,278.954 420.718,287.198 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="387.743,316.05 416.596,320.172 404.23,311.929 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="379.499,332.538 375.377,324.294 363.012,332.538 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="387.743,316.05 379.499,332.538 363.012,332.538
375.377,324.294 "/>
<polygon opacity="0.15" fill="#FFFFFF" enable-background="new " points="416.596,320.172 379.499,332.538 363.012,332.538
375.377,324.294 387.743,316.05 404.23,311.929 420.718,287.198 "/>
</g>
<polyline id="path-eye" opacity="0.25" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" enable-background="new " points="
121.714,247.568 66.427,193.472 66.427,149.497 "/>
<polyline id="path-pie" opacity="0.25" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" enable-background="new " points="
272.069,237.568 226.782,193.472 226.782,155.497 "/>
<polyline id="path-map" opacity="0.25" fill="none" stroke="#000000" stroke-width="2" stroke-miterlimit="10" enable-background="new " points="
412.069,227.568 376.782,193.472 376.782,145.497 "/>
<g id="diagram-eye">
<linearGradient id="SVGID_2_" gradientUnits="userSpaceOnUse" x1="238.8165" y1="619.2575" x2="320.3815" y2="700.8225" gradientTransform="matrix(1 0 0 1 -171 -537.5)">
<stop offset="0" style="stop-color:#000000;stop-opacity:0.15"/>
<stop offset="0.9331" style="stop-color:#000000;stop-opacity:0"/>
</linearGradient>
<polygon fill="url(#SVGID_2_)" points="91.848,220.855 10.283,139.291 125.35,24.224 206.915,105.789 "/>
<rect x="10" y="24.507" fill="#00A99D" width="115.35" height="115.35"/>
<g>
<g>
<g>
<g>
<g>
<defs>
<rect id="SVGID_3_" x="10" y="24.507" width="115.35" height="115.35"/>
</defs>
<clipPath id="SVGID_4_">
<use xlink:href="#SVGID_3_" overflow="visible"/>
</clipPath>
<linearGradient id="SVGID_5_" gradientUnits="userSpaceOnUse" x1="-288.3424" y1="535.6428" x2="-205.4552" y2="618.5298" gradientTransform="matrix(0.5689 0.1954 0.1954 0.5689 124.387 -168.8858)">
<stop offset="0" style="stop-color:#000000;stop-opacity:0.25"/>
<stop offset="1" style="stop-color:#000000;stop-opacity:0"/>
</linearGradient>
<polygon clip-path="url(#SVGID_4_)" fill="url(#SVGID_5_)" points="106.408,162.927 44.068,100.445 96.512,68.965
149.381,121.833 "/>
</g>
</g>
</g>
</g>
</g>
<path fill="#60C6BA" d="M28.023,82.182c0,0,18.023-28.837,39.652-28.837s39.652,28.837,39.652,28.837s-18.023,28.837-39.652,28.837
S28.023,82.182,28.023,82.182z"/>
<g>
<circle fill="#9BEADF" cx="67.675" cy="82.182" r="24.031"/>
</g>
<path fill="#00A99D" d="M67.675,65.017c0,0,3.433,6.866,3.433,17.165s-3.433,17.165-3.433,17.165s-3.433-6.866-3.433-17.165
S67.675,65.017,67.675,65.017z"/>
<circle opacity="0.5" fill="#FFFFFF" enable-background="new " cx="57.921" cy="67.48" r="4.806"/>
<circle opacity="0.5" fill="#FFFFFF" enable-background="new " cx="50.712" cy="74.689" r="2.403"/>
</g>
<g id="diagram-pie">
<linearGradient id="SVGID_6_" gradientUnits="userSpaceOnUse" x1="400.0527" y1="624.0652" x2="473.0262" y2="697.0389" gradientTransform="matrix(1 0 0 1 -171 -537.5)">
<stop offset="0" style="stop-color:#000000;stop-opacity:0.25"/>
<stop offset="0.9" style="stop-color:#000000;stop-opacity:0"/>
</linearGradient>
<path fill="url(#SVGID_6_)" d="M272.351,43.267l-86.596,86.597l72.973,72.973l86.596-86.596L272.351,43.267z"/>
<circle fill="#60C6BA" cx="226.973" cy="83.304" r="61.828"/>
<path fill="#00A99D" d="M197.727,137.784c8.708,4.684,18.665,7.347,29.246,7.347c34.146,0,61.828-27.681,61.828-61.828
s-27.681-61.828-61.828-61.828v59.767L197.727,137.784z"/>
<g>
<g>
<g>
<g>
<g>
<defs>
<circle id="SVGID_7_" cx="226.973" cy="83.304" r="61.828"/>
</defs>
<clipPath id="SVGID_8_">
<use xlink:href="#SVGID_7_" overflow="visible"/>
</clipPath>
<linearGradient id="SVGID_9_" gradientUnits="userSpaceOnUse" x1="397.6839" y1="619.334" x2="444.7831" y2="666.433" gradientTransform="matrix(1 0 0 1 -171 -537.5)">
<stop offset="0" style="stop-color:#000000;stop-opacity:0.25"/>
<stop offset="1" style="stop-color:#000000;stop-opacity:0"/>
</linearGradient>
<path clip-path="url(#SVGID_8_)" fill="url(#SVGID_9_)" d="M258.189,50.329l-4.726,4.726
c6.853,6.853,11.092,16.321,11.092,26.779c0,20.916-16.955,37.871-37.871,37.871c-10.458,0-19.926-4.239-26.779-11.092
l-4.726,4.726l47.099,47.099l63.009-63.009L258.189,50.329z"/>
</g>
</g>
</g>
</g>
</g>
<path fill="#9BEADF" d="M226.973,83.304V21.476c-9.586,0-18.663,2.183-26.76,6.077L226.973,83.304z"/>
<circle fill="#60C6BA" cx="226.973" cy="83.304" r="45.34"/>
<path fill="#00A99D" d="M272.313,83.304c0-25.041-20.3-45.34-45.34-45.34v90.681C252.013,128.644,272.313,108.345,272.313,83.304z"
/>
<path fill="#9BEADF" d="M184.162,68.37l42.811,14.934v-45.34C207.166,37.963,190.337,50.669,184.162,68.37z"/>
</g>
<g id="diagram-map">
<linearGradient id="SVGID_10_" gradientUnits="userSpaceOnUse" x1="505.6437" y1="570.8013" x2="608.6902" y2="673.8477" gradientTransform="matrix(1 0 0 1 -171 -537.5)">
<stop offset="0" style="stop-color:#000000;stop-opacity:0.25"/>
<stop offset="1" style="stop-color:#000000;stop-opacity:0"/>
</linearGradient>
<polygon fill="url(#SVGID_10_)" points="387.104,186.934 330.897,130.727 334.644,33.301 432.069,29.554 488.276,85.761 "/>
<path fill="#60C6BA" d="M435.816,117.612c0,9.313-7.549,16.862-16.862,16.862h-78.69c-9.313,0-16.862-7.549-16.862-16.862v-78.69
c0-9.313,7.549-16.862,16.862-16.862h78.69c9.313,0,16.862,7.549,16.862,16.862V117.612z"/>
<g>
<path fill="#00A99D" d="M412.875,101.541c-0.173,1.625-0.483,1.955,1.618,1.847C414.559,102.355,414.023,101.464,412.875,101.541
C412.822,102.037,414.083,101.46,412.875,101.541z M425.12,118.865c0.869-1.597-3.166-1.674-3.927-1.848
c0.801-2.307-0.758-1.445-2.301-1.944c-0.981-0.317-2.751-2.095-3.72-2.83c-1.12-0.849-2.495-0.625-3.695-1.162
c-1.639-0.734-1.6-2.245-3.661-2.818c-1.15-0.319-4.17,0.105-4.623-0.454c-0.808-0.996-2.685-0.572-3.697-0.255
c-1.204,0.376-2.472,1.029-3.236,2.068c-0.416,0.566-1.26,2.358-1.168,2.545c0.776-0.172,8.085-5.264,8.085-2.542
c0,1.436,4.053,1.143,4.328,2.108c0.547,1.92,3.575,1.939,5.144,1.819c-0.561,2.424,2.1,3.612,3.927,4.158
c-0.159,0.952-1.499,1.761-1.156,2.771C417.782,120.22,423.477,120.739,425.12,118.865
C425.957,117.328,424.645,119.407,425.12,118.865z M395.784,80.974c2.509,0.069,1.327,2.668,3.205,3.107
c1.935,0.453-0.559,5.006,0.952,6.131c0.372-0.824,0.346-1.347,1.385-1.155c-0.047,1.523-1.881,2.833-0.23,4.158
c0.298,0.492,1.155,0.373,1.155,1.155c0,1.539,2.068,4.913,3.927,5.543c0.575-2.302,1.155-4.685,1.155-6.365
c0-1.209-0.534-4.18-1.617-4.722c0.234-1.168,0.235-0.913,0-1.617c-1.028-0.69-0.525-1.354-0.692-2.311
c-0.154-0.88-0.925-2.092-0.925-3.601c0-0.721-1.258-1.364-0.991-2.097c0.381-1.047,0.734-0.752,0.53-2.386
c-0.003,0.008,1.055-2.113,1.155-2.31c-0.512-1.531,2.031-2.269,2.31-3.927c1.698,0.566,1.654-1.618,2.541-1.618
c0.788,0,0.751-1.144,0.924-1.848c1.387,0.347,1.32-0.378,2.541-0.924c1.275-0.651,2.202-2.903,3.696-3.234
c-0.136-0.579-0.367-1.118-0.692-1.617c0.854,0.015,1.187-0.092,1.617-0.462c-0.15-0.595-0.834-1.288-1.155-1.617
c0.57,0.157,1.109,0.08,1.617-0.231c0.407,1.22,1.495,0.917,2.079,0.001c-0.588-0.451-0.413-0.236-0.923-0.924
c-2.706-0.516-1.321-0.662,0.231-1.616c-0.508-1.524-0.092-1.592-1.791-2.426c-0.48-0.236-0.99-1.303-1.212-1.731
c0.616-0.077,1.232-0.154,1.848-0.231c-0.155-0.74-0.927-1.502-1.387-1.848c0.231,0,0.463,0,0.694,0
c-0.272-0.855-1.376-1.159-1.617-2.079c0.231,0,0.461,0,0.692,0c-0.252-1.762,0.278-1.826,0.693-3.696
c0.709,0.076,0.709-0.463,0-1.617c1.639-0.328,0.885-0.792,2.541-0.462c0.214-0.626-0.062-0.534,0.463-0.923
c0.867,1.135-1.279,2.217-1.617,3.232c0.154,0,0.308,0,0.462,0c-1.142,0.548-1.308,3.691-0.692,4.158
c0.473,0.359,2.247-1.061,1.616,1.155c1.652-0.881,1.439-0.474,1.848-1.848c0.158-0.533,0.368-0.674,0.462-1.387
c0.103-0.818-1.031-2.294-0.924-3.927c0.761,0.339,1.825,1.343,2.773,0.923c1.198-0.58,0.322-2.588,1.848-2.079
c0.399-1.329,0.309-4.388-0.001-4.388c0.589,0,1.487-2.163,2.078-2.541c0.9-0.576,2.577-0.124,3.003-1.387
c1.198-0.054,2.052,0.555,2.54,0.231h0.231c0.197-0.515-0.382-0.574-0.462-0.924h0.231c0.151-0.347,0.186-0.377,0.231-0.923
c0.028,0.006,0.057,0.011,0.085,0.017c-2.69-5.74-8.502-9.725-15.261-9.725h-78.69c-9.313,0-16.862,7.549-16.862,16.862v61.411
c0.458,0.918,1.198,2.159,1.477,2.364c1.681,0.128,2.141,3.274,3.465,4.157c0.577,1.067,0.775,2.05,1.617,3.233
c1.367,0.688,2.337,7.623,1.154,7.623c-1.059,0,1.12,6.006,3.004,6.006c0.52,0,2.246,1.595,2.77,2.077
c0.742,0.577,0.698,1.476,1.617,2.08c0.316,0.204,1.355,0.566,1.847,0.693c3.485,0.901,6.774,5.433,10.857,4.619
c0.077,0.231,0.154,0.462,0.231,0.693c0.995,0.053,0.783,0.142,1.386,0.462v0.134h29.595c0.209-0.462-0.014-0.922,0.199-1.524
c0.298-0.276,1.803-5.585-0.229-5.775c0.296-0.644,0.87-1.52,1.155-1.848c0.112,0.498,0.035,0.96-0.231,1.386
c2.802,0.691,0.126-0.015,0.924,0.692c0.154,0,0.307,0,0.461,0c-0.322-2.284,1.188-4.774,0.654-6.635
c-0.335-1.168,1.194-2.637,1.194-3.528c0-1.734,0.816-2.275-0.924-3.233c-0.694-0.382-1.948-0.727-3.234,0
c-2.284,3.036-5.775,0.71-5.775,6.072c0,1.772-2.141,5.815-3.927,6.167c-0.333-0.267-0.576-0.568-0.693-0.923
c-0.542,0.181-1.804,0.217-2.238,0.526c-0.244,0.173-0.924,1.288-0.996,1.321c-0.92-0.453-2.549,0.335-3.552,0.408
c-1.738,0.126-1.403-2.025-3.031-2.025c-2.078,0-1.885-0.493-2.893-2.494c-0.721-1.432-0.569-2.181-2.075-3.05
c-0.257-0.257-0.254-0.6-0.461-0.924c-0.567-0.888-1.997-2.877-2.079-4.156c-0.198,0.127-0.568,0.36-0.692,0.462
c0.316-1.902,0.693-4.139,0.692-5.775c0-0.996-0.947-2.768-0.678-3.571c0.325-0.972-0.078-2.736-0.015-3.357
c-0.317-1.908,0.494-1.278,0.692-3.004c0.212-0.369,1.095-0.273,1.467-1.403c0.323-0.98,0.135-0.973-0.544-1.138
c0.512-1.53-0.621-1.696-0.924-3.002c-0.274-1.181-0.879-3.683,0.461-3.234c0.399-1.043,0.425-3.002,1.849-3.002
c1.109,0,1.63-0.648,1.385-1.617c1.057-0.677,2.649-0.532,3.464-1.155c0.065-1.455,1.375-1.531,0.925-3.003
c0.285,0.095,1.319,0.703,1.385,0.693c0.705-0.106,2.3-0.59,2.079-1.617c0.962,0.485,1.113-0.14,1.848,0
c0.005,0,2.327,0.773,1.848,0.693c0.46,0.104,0.876-0.271,1.617-0.463c-0.211,1.814,1.416,1.576,2.541,0.923
c0,0.154,0,0.308,0,0.462c-2.585,1.273,2.05,1.263,2.54,1.385c-0.253-0.934-0.693-1.484,0.231-2.309
c0.628,0.173,3.465,2.134,3.465,2.308c0,0.726,0.493,0.553,0.924,0.232c-0.194-0.973-2.545-2.14-0.23-2.541
c-0.047-0.174-0.433-1.023-0.693-0.925c-1.103,0.498-0.558-0.805-2.079-0.231c-0.159-0.163-0.461-0.61-0.692-0.923
c0.769-0.104,1.539-0.104,2.31,0c-0.053-0.479,0.108-0.734,0.484-0.766c0.406-0.116,1.422-0.167,1.364-0.159
c0.818-0.111,2.554,1.765,2.309-0.462c0.154,0,0.308,0,0.462,0c0.353,2.143,1.659,1.379,2.078,0.001
c0.584,1.551,1.801,0.262,3.004,0.462c-0.496,1.646,1.971,1.348,2.541,2.772c0.799,0.348,1.109,0.703,2.078,0.461
c-0.381,0.052,2.847-1.321,2.667-0.991C396.719,81.347,395.595,81.32,395.784,80.974
C398.309,81.043,395.457,81.572,395.784,80.974z M428.351,115.631c0.024-0.304-0.19-0.311-0.461-0.231
C428.152,115.658,427.888,115.498,428.351,115.631z M399.478,112.396c0.78,0.312,0.3,1.138-0.462,1.618
C402.647,115.73,399.785,108.812,399.478,112.396z M434.824,120.714c-0.447-0.188-1.037,0.024-1.386,0.462
c-1.893,0.693-2.513-1.081-4.39-0.694c1.479,1.363,0.753,1.063,1.385,2.772c0.088,0.149,1.346,2.124,0.709,2.146
c-0.981,0.035-2.859-0.336-3.845-0.597c-1.739-0.46-3.358,1.223-1.391,1.38c2.47,0.198,4.858,0.304,7.367,0.304
c1.102-1.774,1.884-3.761,2.265-5.893C435.299,120.634,435.062,120.674,434.824,120.714
C434.377,120.526,435.062,120.674,434.824,120.714z M418.188,125.793c-0.611-1.214-4.706-1.446-5.446-0.186
c-0.362,0.616,5.189,3.353,6.758,1.667C419.879,126.867,418.13,125.748,418.188,125.793
C417.857,125.135,418.525,126.058,418.188,125.793z"/>
</g>
<linearGradient id="SVGID_11_" gradientUnits="userSpaceOnUse" x1="548.6378" y1="585.9402" x2="596.8632" y2="634.1658" gradientTransform="matrix(1 0 0 1 -171 -537.5)">
<stop offset="0" style="stop-color:#000000;stop-opacity:0.25"/>
<stop offset="0.7305" style="stop-color:#000000;stop-opacity:0.0245"/>
<stop offset="0.9282" style="stop-color:#000000;stop-opacity:0"/>
</linearGradient>
<polygon fill="url(#SVGID_11_)" points="413.91,108.619 377.844,71.522 389.591,36.487 434.519,83.888 "/>
<path fill="#9BEADF" d="M391.297,48.623h-0.169c0.508-1.435,0.799-2.971,0.799-4.58c0-7.588-6.151-13.739-13.739-13.739
s-13.739,6.151-13.739,13.739c0,1.608,0.291,3.145,0.799,4.58h-0.169l0.504,0.88c0.395,0.911,0.892,1.764,1.466,2.56l11.14,19.459
l11.14-19.459c0.574-0.796,1.071-1.649,1.466-2.56L391.297,48.623z M373.607,44.043c0-2.529,2.051-4.58,4.58-4.58
s4.58,2.05,4.58,4.58c0,2.529-2.051,4.58-4.58,4.58S373.607,46.572,373.607,44.043z"/>
</g>
<rect id="hit-eye" x="6.5" y="22.061" opacity="0" fill="#FF0000" width="122.667" height="123.071"/>
<rect id="hit-pie" x="165.658" y="22.061" opacity="0" fill="#FF0000" width="122.667" height="123.071"/>
<rect id="hit-map" x="316.855" y="22.061" opacity="0" fill="#FF0000" width="122.667" height="123.071"/>
</svg>
</body>
</html>

View File

@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="copyright" content="Copyright © 2013 Adobe Systems Incorporated. All rights reserved.
Licensed under the Apache License, Version 2.0 (the “License”);
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an “AS IS” BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.">
<title>Snap</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<iframe src="crocodile-1.html" ></iframe>
<br>
<iframe src="snap-logo.html" ></iframe>
<iframe src="crocodile-2.html" ></iframe>
</body>
</html>

View File

@ -15,94 +15,118 @@
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.">
<title>Snap Logo</title>
<title>Snap</title>
<script src="../../dist/snap.svg-min.js"></script>
<link rel="stylesheet" href="style.css">
<script>
window.onload = function () {
var logo = Snap.select("#snap-logo"),
elements = [
parts = [
["top", [0, 20]],
["left", [20, 0]],
["bottom", [0, -20]],
["right", [-20, 0]]
],
i;
i = 0,
showTimer = null,
hideTimer = null;
for (i = 0; i < elements.length; i++) {
var el = elements[i],
element = logo.select("#" + el[0]);
for (i = 0; i < parts.length; i++) {
var el = parts[i],
element = logo.select("#" + el[0]);
element.attr({
opacity: 0,
transform: "t" + el[1]
});
elements[i] = element;
parts[i].push(element);
}
i = 0;
function animateEach() {
if (!elements[i]) return;
elements[i].animate({
function showEach() {
clearTimeout(hideTimer);
if (i >= parts.length) return;
parts[i][2].animate({
transform: "t0,0",
opacity: 1
}, 200, mina.easeout);
setTimeout(animateEach, 200);
showTimer = setTimeout(showEach, 200);
i++;
if (i >= parts.length) i = parts.length-1;
}
function hideEach() {
clearTimeout(showTimer);
if (i < 0) return;
parts[i][2].animate({
transform: "t" + parts[i][1],
opacity: 0
}, 200, mina.easeout);
hideTimer = setTimeout(hideEach, 200);
i--;
if (i < 0) i = 0;
}
setTimeout(function () {
logo.attr({
display: "block"
display: "inline"
});
animateEach();
}, 500);
showEach();
}, 100);
logo.hover(hideEach, showEach);
};
</script>
</head>
<body>
<svg version="1.1" id="snap-logo" xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="250px" height="250px" style="display:none">
width="250px" height="250px">
<defs>
<linearGradient id="bottom_1_" gradientUnits="userSpaceOnUse"
x1="196" y1="485.6281" x2="196" y2="732.5812"
gradientTransform="matrix(1 0 0 1 -71 -486.5)">
<stop offset="0" stop-color="#002E3B"/>
<stop offset="1" stop-color="#002639"/>
<stop offset="0" stop-color="#002E3B"/>
<stop offset="1" stop-color="#002639"/>
</linearGradient>
<radialGradient id="right_2_" cx="146.3819" cy="449.8799"
r="408.7811" gradientTransform="matrix(1 0 0 1 -71 -486.5)"
gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#00BC85"/>
<stop offset="1" stop-color="#149D91"/>
<stop offset="0" stop-color="#00BC85"/>
<stop offset="1" stop-color="#149D91"/>
</radialGradient>
<radialGradient id="left_1_" cx="139.0562" cy="454.2622"
r="507.5908" gradientTransform="matrix(1 0 0 1 -71 -486.5)"
gradientUnits="userSpaceOnUse">
<stop offset="0" stop-color="#004473"/>
<stop offset="1" stop-color="#00345F"/>
<stop offset="0" stop-color="#004473"/>
<stop offset="1" stop-color="#00345F"/>
</radialGradient>
<linearGradient id="top_1_" gradientUnits="userSpaceOnUse"
x1="195.922" y1="486.8864" x2="195.922" y2="732.5903"
gradientTransform="matrix(1 0 0 1 -71 -486.5)">
<stop offset="0" stop-color="#002E3B"/>
<stop offset="1" stop-color="#002639"/>
<stop offset="0" stop-color="#002E3B"/>
<stop offset="1" stop-color="#002639"/>
</linearGradient>
</defs>
<polygon id="bottom" fill="url(#bottom_1_)" stroke="url(#bottom_1_)"
points="124.913,210.751 89.063,193.264 89.103,193.245 89.093,193.24
51,211.82 124.941,247.884 199,211.9 160.771,192.962 "/>
<polygon id="right" fill="url(#right_2_)" stroke="url(#right_2_)"
points="198.996,138.632 198.996,38.123 165.596,58.995 165.596,117.758
165.596,117.758 165.596,117.758 51.091,174.781 51.091,211.945 "/>
<polygon id="left" fill="url(#left_1_)" stroke="url(#left_1_)"
points="199,211.912 199,211.912 199,174.746 84.498,117.723 84.498,58.96
51.096,38.088 51.096,138.597 "/>
<polygon id="top" fill="url(#top_1_)" stroke="url(#top_1_)"
points="84.396,58.904 84.396,58.892 124.939,39.118 165.485,58.892
198.844,38.046 124.912,1.985 51,38.035 51,38.067 84.368,58.918 "/>
</defs>
<polygon id="bottom" fill="url(#bottom_1_)" stroke="url(#bottom_1_)"
points="124.913,210.751 89.063,193.264 89.103,193.245 89.093,193.24
51,211.82 124.941,247.884 199,211.9 160.771,192.962 "/>
<polygon id="right" fill="url(#right_2_)" stroke="url(#right_2_)"
points="198.996,138.632 198.996,38.123 165.596,58.995 165.596,117.758
165.596,117.758 165.596,117.758 51.091,174.781 51.091,211.945 "/>
<polygon id="left" fill="url(#left_1_)" stroke="url(#left_1_)"
points="199,211.912 199,211.912 199,174.746 84.498,117.723 84.498,58.96
51.096,38.088 51.096,138.597 "/>
<polygon id="top" fill="url(#top_1_)" stroke="url(#top_1_)"
points="84.396,58.904 84.396,58.892 124.939,39.118 165.485,58.892
198.844,38.046 124.912,1.985 51,38.035 51,38.067 84.368,58.918 "/>
</svg>
</body>
</html>

View File

@ -0,0 +1,20 @@
html {
overflow: hidden;
}
body {
background: #eee;
text-align: center;
}
svg {
display: inline-block;
}
iframe {
display: inline-block;
border: none;
height: 300px;
width: 400px;
margin: 10px;
}

155
dist/reference.html vendored
View File

@ -31,10 +31,10 @@
</div>
</header>
<div id="content" class="max-width"><article id="Element" class="Element-section"><header><h2 id="Element" class="undefined">Element<a href="#Element" title="Link to this section" class="dr-hash">&#x2693;</a></h2></header>
<section><div class="extra" id="Element-extra"></div></section></article><article id="Element.add" class="Element-add-section"><header><h3 id="Element.add" 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 1643 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1643">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element-extra"></div></section></article><article id="Element.add" class="Element-add-section"><header><h3 id="Element.add" 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 1634 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1634">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.add-extra"></div><div class="dr-method"><p>See <a href="#Element.append" class="dr-link">Element.append</a>
</p>
</div></section></article><article id="Element.after" class="Element-after-section"><header><h3 id="Element.after" 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 1696 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1696">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.after" class="Element-after-section"><header><h3 id="Element.after" 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 1687 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1687">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.after-extra"></div><div class="dr-method"><p>Inserts given element after the current one
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">el</span>
@ -42,7 +42,7 @@
<span class="dr-description">element to insert</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
</div></section></article><article id="Element.animate" class="Element-animate-section"><header><h3 id="Element.animate" 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 2140 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2140">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.animate" class="Element-animate-section"><header><h3 id="Element.animate" 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 2134 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2134">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.animate-extra"></div><div class="dr-method"><p>Animates the given attributes of the element
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">attrs</span>
@ -61,7 +61,7 @@
<span class="dr-description">callback function that executes when the animation ends</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the current element</span></p>
</div></section></article><article id="Element.append" class="Element-append-section"><header><h3 id="Element.append" 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 1637 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1637">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.append" class="Element-append-section"><header><h3 id="Element.append" 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 1628 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1628">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.append-extra"></div><div class="dr-method"><p>Appends the given element to current one
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">el</span>
@ -69,7 +69,7 @@
<span class="dr-description">element to append</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
</div></section></article><article id="Element.asPX" class="Element-asPX-section"><header><h3 id="Element.asPX" 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 1784 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1784">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.asPX" class="Element-asPX-section"><header><h3 id="Element.asPX" 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 1775 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1775">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.asPX-extra"></div><div class="dr-method"><p>Returns given attribute of the element as a <code>px</code> value (not %, em, etc.)
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">attr</span>
@ -81,7 +81,7 @@
<span class="dr-description">attribute value</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">result of query selection</span></p>
</div></section></article><article id="Element.attr" class="Element-attr-section"><header><h3 id="Element.attr" 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 1479 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1479">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.attr" class="Element-attr-section"><header><h3 id="Element.attr" 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 1467 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1467">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.attr-extra"></div><div class="dr-method"><p>Gets or sets given attributes of the element
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">params</span>
@ -106,7 +106,7 @@
});
console.log(el.attr("fill")); // #fc0
</code></pre></section>
</div></section></article><article id="Element.before" class="Element-before-section"><header><h3 id="Element.before" 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 1680 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1680">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.before" class="Element-before-section"><header><h3 id="Element.before" 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 1671 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1671">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.before-extra"></div><div class="dr-method"><p>Inserts given element before the current one
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">el</span>
@ -122,11 +122,11 @@ console.log(el.attr("fill")); // #fc0
<span class="dr-description">handler for the event</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div></section></article><article id="Element.clone" class="Element-clone-section"><header><h3 id="Element.clone" 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 1828 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1828">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.clone" class="Element-clone-section"><header><h3 id="Element.clone" 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 1819 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1819">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.clone-extra"></div><div class="dr-method"><p>Creates a clone of the element and inserts it after the element
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the clone</span></p>
</div></section></article><article id="Element.data" class="Element-data-section"><header><h3 id="Element.data" 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 2212 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2212">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.data" class="Element-data-section"><header><h3 id="Element.data" 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 2206 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2206">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.data-extra"></div><div class="dr-method"><p>Adds or retrieves given value associated with given key. (Dont confuse
with <code>data-</code> attributes)
</p>
@ -256,7 +256,7 @@ with <code>data-</code> attributes)
<ol class="dr-json"><li><span class="dr-json-key">event</span><span class="dr-type"><em class="dr-type-object">object</em></span><span class="dr-json-description">DOM event object</span>
</ol>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div></section></article><article id="Element.getBBox" class="Element-getBBox-section"><header><h3 id="Element.getBBox" 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 1528 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1528">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.getBBox" class="Element-getBBox-section"><header><h3 id="Element.getBBox" 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 1516 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1516">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.getBBox-extra"></div><div class="dr-method"><p>Returns the bounding box descriptor for the given element
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">bounding box descriptor:</span></p>
@ -322,7 +322,7 @@ with <code>data-</code> attributes)
<span class="dr-description">context for hover out handler</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div></section></article><article id="Element.inAnim" class="Element-inAnim-section"><header><h3 id="Element.inAnim" 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 2055 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2055">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.inAnim" class="Element-inAnim-section"><header><h3 id="Element.inAnim" 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 2046 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2046">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.inAnim-extra"></div><div class="dr-method"><p>Returns a set of animations that may be able to manipulate the current element
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">in format:</span></p>
@ -331,11 +331,11 @@ with <code>data-</code> attributes)
<li><span class="dr-json-key">status</span><span class="dr-type"><em class="dr-type-function">function</em></span><span class="dr-json-description">gets or sets the status of the animation,</span>
<li><span class="dr-json-key">stop</span><span class="dr-type"><em class="dr-type-function">function</em></span><span class="dr-json-description">stops the animation</span>
</ol></li><li>}</li></ol>
</div></section></article><article id="Element.innerSVG" class="Element-innerSVG-section"><header><h3 id="Element.innerSVG" 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 2261 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2261">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.innerSVG" class="Element-innerSVG-section"><header><h3 id="Element.innerSVG" 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 2255 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2255">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.innerSVG-extra"></div><div class="dr-method"><p>Returns SVG code for the element&#39;s contents, equivalent to HTML&#39;s <code>innerHTML</code>
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">SVG code for the element</span></p>
</div></section></article><article id="Element.insertAfter" class="Element-insertAfter-section"><header><h3 id="Element.insertAfter" 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 1726 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1726">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.insertAfter" class="Element-insertAfter-section"><header><h3 id="Element.insertAfter" 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 1717 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1717">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.insertAfter-extra"></div><div class="dr-method"><p>Inserts the element after the given one
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">el</span>
@ -343,7 +343,7 @@ with <code>data-</code> attributes)
<span class="dr-description">element next to whom insert to</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
</div></section></article><article id="Element.insertBefore" class="Element-insertBefore-section"><header><h3 id="Element.insertBefore" 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 1711 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1711">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.insertBefore" class="Element-insertBefore-section"><header><h3 id="Element.insertBefore" 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 1702 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1702">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.insertBefore-extra"></div><div class="dr-method"><p>Inserts the element after the given one
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">el</span>
@ -351,7 +351,7 @@ with <code>data-</code> attributes)
<span class="dr-description">element next to whom insert to</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
</div></section></article><article id="Element.marker" class="Element-marker-section"><header><h3 id="Element.marker" 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 1979 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1979">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.marker" class="Element-marker-section"><header><h3 id="Element.marker" 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 1970 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1970">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.marker-extra"></div><div class="dr-method"><p>Creates a <code>&lt;marker&gt;</code> element from the current element
To create a marker you have to specify the bounding rect and reference point:
</p>
@ -417,11 +417,11 @@ To create a marker you have to specify the bounding rect and reference point:
<span class="dr-description">handler for the event</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div></section></article><article id="Element.parent" class="Element-parent-section"><header><h3 id="Element.parent" 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 1625 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1625">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.parent" class="Element-parent-section"><header><h3 id="Element.parent" 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 1616 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1616">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.parent-extra"></div><div class="dr-method"><p>Returns the element&#39;s parent
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
</div></section></article><article id="Element.pattern" class="Element-pattern-section"><header><h3 id="Element.pattern" 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 1938 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1938">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.pattern" class="Element-pattern-section"><header><h3 id="Element.pattern" 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 1929 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1929">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.pattern-extra"></div><div class="dr-method"><p>Creates a <code>&lt;pattern&gt;</code> element from the current element
To create a pattern you have to specify the pattern rect:
</p>
@ -451,7 +451,7 @@ c.attr({
fill: p
});
</code></pre></section>
</div></section></article><article id="Element.prepend" class="Element-prepend-section"><header><h3 id="Element.prepend" 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 1665 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1665">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.prepend" class="Element-prepend-section"><header><h3 id="Element.prepend" 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 1656 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1656">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.prepend-extra"></div><div class="dr-method"><p>Prepends the given element to the current one
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">el</span>
@ -459,11 +459,11 @@ c.attr({
<span class="dr-description">element to prepend</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the parent element</span></p>
</div></section></article><article id="Element.remove" class="Element-remove-section"><header><h3 id="Element.remove" 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 1739 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1739">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.remove" class="Element-remove-section"><header><h3 id="Element.remove" 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 1730 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1730">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.remove-extra"></div><div class="dr-method"><p>Removes element from the DOM
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the detached element</span></p>
</div></section></article><article id="Element.removeData" class="Element-removeData-section"><header><h3 id="Element.removeData" 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 2237 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2237">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.removeData" class="Element-removeData-section"><header><h3 id="Element.removeData" 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 2231 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2231">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.removeData-extra"></div><div class="dr-method"><p>Removes value associated with an element by given key.
If key is not provided, removes all the data of the element.
</p>
@ -473,7 +473,7 @@ If key is not provided, removes all the data of the element.
<span class="dr-description">key</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div></section></article><article id="Element.select" class="Element-select-section"><header><h3 id="Element.select" 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 1754 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1754">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.select" class="Element-select-section"><header><h3 id="Element.select" 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 1745 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1745">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.select-extra"></div><div class="dr-method"><p>Gathers the nested <a href="#Element" class="dr-link">Element</a> matching the given set of CSS selectors
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">query</span>
@ -481,7 +481,7 @@ If key is not provided, removes all the data of the element.
<span class="dr-description">CSS selector</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">result of query selection</span></p>
</div></section></article><article id="Element.selectAll" class="Element-selectAll-section"><header><h3 id="Element.selectAll" 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 1766 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1766">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.selectAll" class="Element-selectAll-section"><header><h3 id="Element.selectAll" 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 1757 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1757">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.selectAll-extra"></div><div class="dr-method"><p>Gathers nested <a href="#Element" class="dr-link">Element</a> objects matching the given set of CSS selectors
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">query</span>
@ -489,15 +489,15 @@ If key is not provided, removes all the data of the element.
<span class="dr-description">CSS selector</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Set">Set</em> <em class="dr-type-array">array</em> <span class="dr-description">result of query selection</span></p>
</div></section></article><article id="Element.stop" class="Element-stop-section"><header><h3 id="Element.stop" 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 2119 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2119">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.stop" class="Element-stop-section"><header><h3 id="Element.stop" 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 2113 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2113">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.stop-extra"></div><div class="dr-method"><p>Stops all the animations for the current element
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the current element</span></p>
</div></section></article><article id="Element.toDefs" class="Element-toDefs-section"><header><h3 id="Element.toDefs" 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 1908 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1908">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.toDefs" class="Element-toDefs-section"><header><h3 id="Element.toDefs" 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 1899 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1899">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.toDefs-extra"></div><div class="dr-method"><p>Moves element to the shared <code>&lt;defs&gt;</code> area
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the clone</span></p>
</div></section></article><article id="Element.toString" class="Element-toString-section"><header><h3 id="Element.toString" class="dr-method">Element.toString()<a href="#Element.toString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2942 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2942">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.toString" class="Element-toString-section"><header><h3 id="Element.toString" class="dr-method">Element.toString()<a href="#Element.toString" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 2936 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2936">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.toString-extra"></div><div class="dr-method"><p>Returns SVG code for the element, equivalent to HTML&#39;s <code>outerHTML</code>
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">SVG code for the element</span></p>
@ -536,7 +536,7 @@ If key is not provided, removes all the data of the element.
<span class="dr-description">handler for the event</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div></section></article><article id="Element.transform" class="Element-transform-section"><header><h3 id="Element.transform" 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 1583 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1583">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.transform" class="Element-transform-section"><header><h3 id="Element.transform" 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 1571 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1571">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.transform-extra"></div><div class="dr-method"><p>Gets or sets transformation of the element
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">tstr</span>
@ -657,15 +657,15 @@ If key is not provided, removes all the data of the element.
<span class="dr-description">handler for the event</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Element" class="dr-link">Element</a></span></p>
</div></section></article><article id="Element.use" class="Element-use-section"><header><h3 id="Element.use" 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 1799 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1799">&#x27ad;</a></h3></header>
</div></section></article><article id="Element.use" class="Element-use-section"><header><h3 id="Element.use" 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 1790 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1790">&#x27ad;</a></h3></header>
<section><div class="extra" id="Element.use-extra"></div><div class="dr-method"><p>Creates a <code>&lt;use&gt;</code> element linked to the current element
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the <code>&lt;use&gt;</code> element</span></p>
</div></section></article><article id="Fragment" class="Fragment-section"><header><h2 id="Fragment" class="undefined">Fragment<a href="#Fragment" title="Link to this section" class="dr-hash">&#x2693;</a></h2></header>
<section><div class="extra" id="Fragment-extra"></div></section></article><article id="Fragment.select" class="Fragment-select-section"><header><h3 id="Fragment.select" 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 2331 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2331">&#x27ad;</a></h3></header>
<section><div class="extra" id="Fragment-extra"></div></section></article><article id="Fragment.select" class="Fragment-select-section"><header><h3 id="Fragment.select" 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 2325 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2325">&#x27ad;</a></h3></header>
<section><div class="extra" id="Fragment.select-extra"></div><div class="dr-method"><p>See <a href="#Element.select" class="dr-link">Element.select</a>
</p>
</div></section></article><article id="Fragment.selectAll" class="Fragment-selectAll-section"><header><h3 id="Fragment.selectAll" 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 2338 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2338">&#x27ad;</a></h3></header>
</div></section></article><article id="Fragment.selectAll" class="Fragment-selectAll-section"><header><h3 id="Fragment.selectAll" 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 2332 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2332">&#x27ad;</a></h3></header>
<section><div class="extra" id="Fragment.selectAll-extra"></div><div class="dr-method"><p>See <a href="#Element.selectAll" class="dr-link">Element.selectAll</a>
</p>
</div></section></article><article id="Matrix" class="Matrix-section"><header><h2 id="Matrix" class="undefined">Matrix<a href="#Matrix" title="Link to this section" class="dr-hash">&#x2693;</a></h2></header>
@ -697,15 +697,15 @@ If key is not provided, removes all the data of the element.
<span class="dr-type"><em class="dr-type-object">object</em></span>
<span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></li>
</ol></div>
</div></section></article><article id="Matrix.clone" class="Matrix-clone-section"><header><h3 id="Matrix.clone" class="dr-method">Matrix.clone()<a href="#Matrix.clone" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 437 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L437">&#x27ad;</a></h3></header>
</div></section></article><article id="Matrix.clone" class="Matrix-clone-section"><header><h3 id="Matrix.clone" class="dr-method">Matrix.clone()<a href="#Matrix.clone" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 436 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L436">&#x27ad;</a></h3></header>
<section><div class="extra" id="Matrix.clone-extra"></div><div class="dr-method"><p>Returns a copy of the matrix
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></p>
</div></section></article><article id="Matrix.invert" class="Matrix-invert-section"><header><h3 id="Matrix.invert" class="dr-method">Matrix.invert()<a href="#Matrix.invert" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 425 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L425">&#x27ad;</a></h3></header>
</div></section></article><article id="Matrix.invert" class="Matrix-invert-section"><header><h3 id="Matrix.invert" class="dr-method">Matrix.invert()<a href="#Matrix.invert" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 424 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L424">&#x27ad;</a></h3></header>
<section><div class="extra" id="Matrix.invert-extra"></div><div class="dr-method"><p>Returns an inverted version of the matrix
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></p>
</div></section></article><article id="Matrix.rotate" class="Matrix-rotate-section"><header><h3 id="Matrix.rotate" class="dr-method">Matrix.rotate(a, x, y)<a href="#Matrix.rotate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 478 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L478">&#x27ad;</a></h3></header>
</div></section></article><article id="Matrix.rotate" class="Matrix-rotate-section"><header><h3 id="Matrix.rotate" class="dr-method">Matrix.rotate(a, x, y)<a href="#Matrix.rotate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 477 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L477">&#x27ad;</a></h3></header>
<section><div class="extra" id="Matrix.rotate-extra"></div><div class="dr-method"><p>Rotates the matrix
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">a</span>
@ -718,7 +718,7 @@ If key is not provided, removes all the data of the element.
<span class="dr-type"><em class="dr-type-number">number</em></span>
<span class="dr-description">vertical origin point from which to rotate</span></li>
</ol></div>
</div></section></article><article id="Matrix.scale" class="Matrix-scale-section"><header><h3 id="Matrix.scale" class="dr-method">Matrix.scale(x, [y], [cx], [cy])<a href="#Matrix.scale" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 462 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L462">&#x27ad;</a></h3></header>
</div></section></article><article id="Matrix.scale" class="Matrix-scale-section"><header><h3 id="Matrix.scale" class="dr-method">Matrix.scale(x, [y], [cx], [cy])<a href="#Matrix.scale" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 461 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L461">&#x27ad;</a></h3></header>
<section><div class="extra" id="Matrix.scale-extra"></div><div class="dr-method"><p>Scales the matrix
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">x</span>
@ -737,7 +737,9 @@ If key is not provided, removes all the data of the element.
<span class="dr-type"><em class="dr-type-number">number</em></span>
<span class="dr-description">vertical origin point from which to scale</span></li>
</ol></div>
</div></section></article><article id="Matrix.split" class="Matrix-split-section"><header><h3 id="Matrix.split" 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 545 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L545">&#x27ad;</a></h3></header>
<p>Default cx, cy is the middle point of the element.
</p>
</div></section></article><article id="Matrix.split" class="Matrix-split-section"><header><h3 id="Matrix.split" 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 544 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L544">&#x27ad;</a></h3></header>
<section><div class="extra" id="Matrix.split-extra"></div><div class="dr-method"><p>Splits matrix into primitive transformations
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">in format:</span></p>
@ -749,11 +751,11 @@ If key is not provided, removes all the data of the element.
<li><span class="dr-json-key">rotate</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">rotation in deg</span>
<li><span class="dr-json-key">isSimple</span><span class="dr-type"><em class="dr-type-boolean">boolean</em></span><span class="dr-json-description">could it be represented via simple transformations</span>
</ol>
</div></section></article><article id="Matrix.toTransformString" class="Matrix-toTransformString-section"><header><h3 id="Matrix.toTransformString" 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 588 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L588">&#x27ad;</a></h3></header>
</div></section></article><article id="Matrix.toTransformString" class="Matrix-toTransformString-section"><header><h3 id="Matrix.toTransformString" 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 587 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L587">&#x27ad;</a></h3></header>
<section><div class="extra" id="Matrix.toTransformString-extra"></div><div class="dr-method"><p>Returns transform string that represents given matrix
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">transform string</span></p>
</div></section></article><article id="Matrix.translate" class="Matrix-translate-section"><header><h3 id="Matrix.translate" class="dr-method">Matrix.translate(x, y)<a href="#Matrix.translate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 448 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L448">&#x27ad;</a></h3></header>
</div></section></article><article id="Matrix.translate" class="Matrix-translate-section"><header><h3 id="Matrix.translate" class="dr-method">Matrix.translate(x, y)<a href="#Matrix.translate" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 447 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L447">&#x27ad;</a></h3></header>
<section><div class="extra" id="Matrix.translate-extra"></div><div class="dr-method"><p>Translate the matrix
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">x</span>
@ -763,7 +765,7 @@ If key is not provided, removes all the data of the element.
<span class="dr-type"><em class="dr-type-number">number</em></span>
<span class="dr-description">vertical offset distance</span></li>
</ol></div>
</div></section></article><article id="Matrix.x" class="Matrix-x-section"><header><h3 id="Matrix.x" class="dr-method">Matrix.x(x, y)<a href="#Matrix.x" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 496 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L496">&#x27ad;</a></h3></header>
</div></section></article><article id="Matrix.x" class="Matrix-x-section"><header><h3 id="Matrix.x" class="dr-method">Matrix.x(x, y)<a href="#Matrix.x" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 495 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L495">&#x27ad;</a></h3></header>
<section><div class="extra" id="Matrix.x-extra"></div><div class="dr-method"><p>Returns x coordinate for given point after transformation described by the matrix. See also <a href="#Matrix.y" class="dr-link">Matrix.y</a>
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">x</span>
@ -774,7 +776,7 @@ If key is not provided, removes all the data of the element.
<span class="dr-description">&#160;</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">x</span></p>
</div></section></article><article id="Matrix.y" class="Matrix-y-section"><header><h3 id="Matrix.y" class="dr-method">Matrix.y(x, y)<a href="#Matrix.y" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 508 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L508">&#x27ad;</a></h3></header>
</div></section></article><article id="Matrix.y" class="Matrix-y-section"><header><h3 id="Matrix.y" class="dr-method">Matrix.y(x, y)<a href="#Matrix.y" title="Link to this section" class="dr-hash">&#x2693;</a><a class="dr-sourceline" title="Go to line 507 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L507">&#x27ad;</a></h3></header>
<section><div class="extra" id="Matrix.y-extra"></div><div class="dr-method"><p>Returns y coordinate for given point after transformation described by the matrix. See also <a href="#Matrix.x" class="dr-link">Matrix.x</a>
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">x</span>
@ -786,7 +788,7 @@ If key is not provided, removes all the data of the element.
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">y</span></p>
</div></section></article><article id="Paper" class="Paper-section"><header><h2 id="Paper" class="undefined">Paper<a href="#Paper" title="Link to this section" class="dr-hash">&#x2693;</a></h2></header>
<section><div class="extra" id="Paper-extra"></div></section></article><article id="Paper.circle" class="Paper-circle-section"><header><h3 id="Paper.circle" 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 2611 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2611">&#x27ad;</a></h3></header>
<section><div class="extra" id="Paper-extra"></div></section></article><article id="Paper.circle" class="Paper-circle-section"><header><h3 id="Paper.circle" 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 2605 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2605">&#x27ad;</a></h3></header>
<section><div class="extra" id="Paper.circle-extra"></div><div class="dr-method"><p>Draws a circle
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">x</span>
@ -802,7 +804,7 @@ If key is not provided, removes all the data of the element.
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">the <code>circle</code> element</span></p>
<h3>Usage</h3><section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var c = paper.circle(50, 50, 40);
</code></pre></section>
</div></section></article><article id="Paper.el" class="Paper-el-section"><header><h3 id="Paper.el" 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 2551 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2551">&#x27ad;</a></h3></header>
</div></section></article><article id="Paper.el" class="Paper-el-section"><header><h3 id="Paper.el" 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 2545 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2545">&#x27ad;</a></h3></header>
<section><div class="extra" id="Paper.el-extra"></div><div class="dr-method"><p>Creates an element on paper with a given name and no attributes
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">name</span>
@ -820,7 +822,7 @@ var c = paper.el("circle").attr({
r: 10
});
</code></pre></section>
</div></section></article><article id="Paper.ellipse" class="Paper-ellipse-section"><header><h3 id="Paper.ellipse" 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 2686 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2686">&#x27ad;</a></h3></header>
</div></section></article><article id="Paper.ellipse" class="Paper-ellipse-section"><header><h3 id="Paper.ellipse" 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 2680 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2680">&#x27ad;</a></h3></header>
<section><div class="extra" id="Paper.ellipse-extra"></div><div class="dr-method"><p>Draws an ellipse
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">x</span>
@ -854,7 +856,7 @@ var c = paper.el("circle").attr({
filter: f
});
</code></pre></section>
</div></section></article><article id="Paper.g" class="Paper-g-section"><header><h3 id="Paper.g" 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 2762 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2762">&#x27ad;</a></h3></header>
</div></section></article><article id="Paper.g" class="Paper-g-section"><header><h3 id="Paper.g" 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 2756 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2756">&#x27ad;</a></h3></header>
<section><div class="extra" id="Paper.g-extra"></div><div class="dr-method"><p>Creates a group element
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param optional">varargs</span>
@ -874,7 +876,7 @@ var c = paper.el("circle").attr({
g = paper.g();
g.add(c2, c1);
</code></pre></section>
</div></section></article><article id="Paper.gradient" class="Paper-gradient-section"><header><h3 id="Paper.gradient" 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 2926 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2926">&#x27ad;</a></h3></header>
</div></section></article><article id="Paper.gradient" class="Paper-gradient-section"><header><h3 id="Paper.gradient" 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 2920 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2920">&#x27ad;</a></h3></header>
<section><div class="extra" id="Paper.gradient-extra"></div><div class="dr-method"><p>Creates a gradient element
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">gradient</span>
@ -917,10 +919,10 @@ half the width, from black to white:
});
</code></pre></section>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">the <code>gradient</code> element</span></p>
</div></section></article><article id="Paper.group" class="Paper-group-section"><header><h3 id="Paper.group" 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 2768 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2768">&#x27ad;</a></h3></header>
</div></section></article><article id="Paper.group" class="Paper-group-section"><header><h3 id="Paper.group" 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 2762 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2762">&#x27ad;</a></h3></header>
<section><div class="extra" id="Paper.group-extra"></div><div class="dr-method"><p>See <a href="#Paper.g" class="dr-link">Paper.g</a>
</p>
</div></section></article><article id="Paper.image" class="Paper-image-section"><header><h3 id="Paper.image" 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 2643 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2643">&#x27ad;</a></h3></header>
</div></section></article><article id="Paper.image" class="Paper-image-section"><header><h3 id="Paper.image" 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 2637 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2637">&#x27ad;</a></h3></header>
<section><div class="extra" id="Paper.image-extra"></div><div class="dr-method"><p>Places an image on the surface
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">src</span>
@ -945,7 +947,7 @@ half the width, from black to white:
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">Raphaël element object with type <code>image</code></span></p>
<h3>Usage</h3><section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var c = paper.image("apple.png", 10, 10, 80, 80);
</code></pre></section>
</div></section></article><article id="Paper.line" class="Paper-line-section"><header><h3 id="Paper.line" 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 2824 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2824">&#x27ad;</a></h3></header>
</div></section></article><article id="Paper.line" class="Paper-line-section"><header><h3 id="Paper.line" 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 2818 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2818">&#x27ad;</a></h3></header>
<section><div class="extra" id="Paper.line-extra"></div><div class="dr-method"><p>Draws a line
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">x1</span>
@ -964,7 +966,7 @@ half the width, from black to white:
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">the <code>line</code> element</span></p>
<h3>Usage</h3><section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var t1 = paper.line(50, 50, 100, 100);
</code></pre></section>
</div></section></article><article id="Paper.path" class="Paper-path-section"><header><h3 id="Paper.path" 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 2731 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2731">&#x27ad;</a></h3></header>
</div></section></article><article id="Paper.path" class="Paper-path-section"><header><h3 id="Paper.path" 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 2725 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2725">&#x27ad;</a></h3></header>
<section><div class="extra" id="Paper.path-extra"></div><div class="dr-method"><p>Creates a <code>&lt;path&gt;</code> element using the given string as the path&#39;s definition
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param optional">pathString</span>
@ -999,10 +1001,10 @@ Note: there is a special case when a path consists of only three commands: <code
// draw a diagonal line:
// move to 10,10, line to 90,90
</code></pre></section>
</div></section></article><article id="Paper.polygon" class="Paper-polygon-section"><header><h3 id="Paper.polygon" 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 2873 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2873">&#x27ad;</a></h3></header>
</div></section></article><article id="Paper.polygon" class="Paper-polygon-section"><header><h3 id="Paper.polygon" 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 2867 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2867">&#x27ad;</a></h3></header>
<section><div class="extra" id="Paper.polygon-extra"></div><div class="dr-method"><p>Draws a polygon. See <a href="#Paper.polyline" class="dr-link">Paper.polyline</a>
</p>
</div></section></article><article id="Paper.polyline" class="Paper-polyline-section"><header><h3 id="Paper.polyline" 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 2853 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2853">&#x27ad;</a></h3></header>
</div></section></article><article id="Paper.polyline" class="Paper-polyline-section"><header><h3 id="Paper.polyline" 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 2847 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2847">&#x27ad;</a></h3></header>
<section><div class="extra" id="Paper.polyline-extra"></div><div class="dr-method"><p>Draws a polyline
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">points</span>
@ -1019,7 +1021,7 @@ Note: there is a special case when a path consists of only three commands: <code
<h3>Usage</h3><section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var p1 = paper.polyline([10, 10, 100, 100]);
var p2 = paper.polyline(10, 10, 100, 100);
</code></pre></section>
</div></section></article><article id="Paper.rect" class="Paper-rect-section"><header><h3 id="Paper.rect" 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 2574 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2574">&#x27ad;</a></h3></header>
</div></section></article><article id="Paper.rect" class="Paper-rect-section"><header><h3 id="Paper.rect" 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 2568 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2568">&#x27ad;</a></h3></header>
<section><div class="extra" id="Paper.rect-extra"></div><div class="dr-method"><p></p>
<p>Draws a rectangle
</p>
@ -1050,7 +1052,7 @@ var c = paper.rect(10, 10, 50, 50);
// rectangle with rounded corners
var c = paper.rect(40, 40, 50, 50, 10);
</code></pre></section>
</div></section></article><article id="Paper.text" class="Paper-text-section"><header><h3 id="Paper.text" 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 2796 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2796">&#x27ad;</a></h3></header>
</div></section></article><article id="Paper.text" class="Paper-text-section"><header><h3 id="Paper.text" 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 2790 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2790">&#x27ad;</a></h3></header>
<section><div class="extra" id="Paper.text-extra"></div><div class="dr-method"><p>Draws a text string
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">x</span>
@ -1067,7 +1069,7 @@ var c = paper.rect(40, 40, 50, 50, 10);
<h3>Usage</h3><section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var t1 = paper.text(50, 50, "Snap");
var t2 = paper.text(50, 50, ["S","n","a","p"]);
</code></pre></section>
</div></section></article><article id="Paper.toString" class="Paper-toString-section"><header><h3 id="Paper.toString" 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 2942 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2942">&#x27ad;</a></h3></header>
</div></section></article><article id="Paper.toString" class="Paper-toString-section"><header><h3 id="Paper.toString" 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 2936 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2936">&#x27ad;</a></h3></header>
<section><div class="extra" id="Paper.toString-extra"></div><div class="dr-method"><p>Returns SVG code for the element, equivalent to HTML&#39;s <code>outerHTML</code>
</p>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">SVG code for the element</span></p>
@ -1123,7 +1125,7 @@ var t2 = paper.text(50, 50, ["S","n","a","p"]);
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">set elements that were deleted</span></p>
</div></section></article><article id="Snap" class="Snap-section"><header><h2 id="Snap" class="undefined">Snap<a href="#Snap" title="Link to this section" class="dr-hash">&#x2693;</a></h2></header>
<section><div class="extra" id="Snap-extra"></div></section></article><article id="Snap.Matrix" class="Snap-Matrix-section"><header><h3 id="Snap.Matrix" 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 620 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L620">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap-extra"></div></section></article><article id="Snap.Matrix" class="Snap-Matrix-section"><header><h3 id="Snap.Matrix" 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 619 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L619">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.Matrix-extra"></div><div class="dr-method"><p>Utility method
Returns a matrix based on the given parameters
</p>
@ -1153,7 +1155,7 @@ Returns a matrix based on the given parameters
<span class="dr-description">&#160;</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description"><a href="#Matrix" class="dr-link">Matrix</a></span></p>
</div></section></article><article id="Snap.ajax" class="Snap-ajax-section"><header><h3 id="Snap.ajax" 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 2974 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2974">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.ajax" class="Snap-ajax-section"><header><h3 id="Snap.ajax" 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 2968 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2968">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.ajax-extra"></div><div class="dr-method"><p>Simple implementation of Ajax
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">url</span>
@ -1209,7 +1211,7 @@ Returns a matrix based on the given parameters
<span class="dr-description">y coord of third point</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">angle in degrees</span></p>
</div></section></article><article id="Snap.animate" class="Snap-animate-section"><header><h3 id="Snap.animate" 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 2100 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2100">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.animate" class="Snap-animate-section"><header><h3 id="Snap.animate" 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 2095 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2095">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.animate-extra"></div><div class="dr-method"><p>Runs generic animation of one number into another with a caring function
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">from</span>
@ -1241,7 +1243,16 @@ Returns a matrix based on the given parameters
<li><span class="dr-json-key">status</span><span class="dr-type"><em class="dr-type-function">function</em></span><span class="dr-json-description">gets or sets the status of the animation,</span>
<li><span class="dr-json-key">stop</span><span class="dr-type"><em class="dr-type-function">function</em></span><span class="dr-json-description">stops the animation</span>
</ol></li><li>}</li></ol>
</div></section></article><article id="Snap.animation" class="Snap-animation-section"><header><h3 id="Snap.animation" 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 2038 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2038">&#x27ad;</a></h3></header>
<section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var rect = Snap().rect(0, 0, 10, 10);
Snap.animate(0, 10, function (val) {
rect.attr({
x: val
});
}, 1000);
// in given context is equivalent to
rect.animate({x: 10}, 1000);
</code></pre></section>
</div></section></article><article id="Snap.animation" class="Snap-animation-section"><header><h3 id="Snap.animation" 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 2029 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2029">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.animation-extra"></div><div class="dr-method"><p>Creates an animation object
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">attr</span>
@ -1260,7 +1271,7 @@ Returns a matrix based on the given parameters
<span class="dr-description">callback function that fires when animation ends</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-object">object</em> <span class="dr-description">animation object</span></p>
</div></section></article><article id="Snap.color" class="Snap-color-section"><header><h3 id="Snap.color" 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 857 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L857">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.color" class="Snap-color-section"><header><h3 id="Snap.color" 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 856 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L856">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.color-extra"></div><div class="dr-method"><p>Parses the color string and returns an object featuring the color&#39;s component values
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">clr</span>
@ -1406,7 +1417,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
}
}));
</code></pre></section>
</div></section></article><article id="Snap.fragment" class="Snap-fragment-section"><header><h3 id="Snap.fragment" 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 2349 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2349">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.fragment" class="Snap-fragment-section"><header><h3 id="Snap.fragment" 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 2343 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2343">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.fragment-extra"></div><div class="dr-method"><p>Creates a DOM fragment from a given list of elements or strings
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">varargs</span>
@ -1414,7 +1425,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<span class="dr-description">SVG string</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Fragment">Fragment</em> <span class="dr-description">the <a href="#Fragment" class="dr-link">Fragment</a></span></p>
</div></section></article><article id="Snap.getRGB" class="Snap-getRGB-section"><header><h3 id="Snap.getRGB" 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 655 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L655">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.getRGB" class="Snap-getRGB-section"><header><h3 id="Snap.getRGB" 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 654 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L654">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.getRGB-extra"></div><div class="dr-method"><p>Parses color string as RGB object
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">color</span>
@ -1447,7 +1458,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<li><span class="dr-json-key">hex</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">color in HTML/CSS format: #••••••,</span>
<li><span class="dr-json-key">error</span><span class="dr-type"><em class="dr-type-boolean">boolean</em></span><span class="dr-json-description">true if string can&#39;t be parsed</span>
</ol></li><li>}</li></ol>
</div></section></article><article id="Snap.hsb" class="Snap-hsb-section"><header><h3 id="Snap.hsb" 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 744 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L744">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.hsb" class="Snap-hsb-section"><header><h3 id="Snap.hsb" 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 743 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L743">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.hsb-extra"></div><div class="dr-method"><p>Converts HSB values to a hex representation of the color
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">h</span>
@ -1461,7 +1472,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<span class="dr-description">value or brightness</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">hex representation of the color</span></p>
</div></section></article><article id="Snap.hsb2rgb" class="Snap-hsb2rgb-section"><header><h3 id="Snap.hsb2rgb" 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 909 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L909">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.hsb2rgb" class="Snap-hsb2rgb-section"><header><h3 id="Snap.hsb2rgb" 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 908 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L908">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.hsb2rgb-extra"></div><div class="dr-method"><p>Converts HSB values to an RGB object
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">h</span>
@ -1480,7 +1491,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<li><span class="dr-json-key">b</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">blue,</span>
<li><span class="dr-json-key">hex</span><span class="dr-type"><em class="dr-type-string">string</em></span><span class="dr-json-description">color in HTML/CSS format: #••••••</span>
</ol></li><li>}</li></ol>
</div></section></article><article id="Snap.hsl" class="Snap-hsl-section"><header><h3 id="Snap.hsl" 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 757 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L757">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.hsl" class="Snap-hsl-section"><header><h3 id="Snap.hsl" 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 756 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L756">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.hsl-extra"></div><div class="dr-method"><p>Converts HSL values to a hex representation of the color
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">h</span>
@ -1494,7 +1505,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<span class="dr-description">luminosity</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">hex representation of the color</span></p>
</div></section></article><article id="Snap.hsl2rgb" class="Snap-hsl2rgb-section"><header><h3 id="Snap.hsl2rgb" 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 945 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L945">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.hsl2rgb" class="Snap-hsl2rgb-section"><header><h3 id="Snap.hsl2rgb" 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 944 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L944">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.hsl2rgb-extra"></div><div class="dr-method"><p>Converts HSL values to an RGB object
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">h</span>
@ -1524,7 +1535,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<span class="dr-description">name of the type, e.g., <code>string</code>, <code>function</code>, <code>number</code>, etc.</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-boolean">boolean</em> <span class="dr-description"><code>true</code> if given value is of given type</span></p>
</div></section></article><article id="Snap.load" class="Snap-load-section"><header><h3 id="Snap.load" 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 3020 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L3020">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.load" class="Snap-load-section"><header><h3 id="Snap.load" 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 3014 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L3014">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.load-extra"></div><div class="dr-method"><p>Loads external SVG file as a <a href="#Fragment" class="dr-link">Fragment</a> (see <a href="#Snap.ajax" class="dr-link">Snap.ajax</a> for more advanced AJAX)
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">url</span>
@ -1538,7 +1549,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<span class="dr-type"><em class="dr-type-object">object</em></span>
<span class="dr-description">scope of callback</span></li>
</ol></div>
</div></section></article><article id="Snap.parse" class="Snap-parse-section"><header><h3 id="Snap.parse" 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 2300 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2300">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.parse" class="Snap-parse-section"><header><h3 id="Snap.parse" 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 2294 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L2294">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.parse-extra"></div><div class="dr-method"><p>Parses SVG fragment and converts it into a <a href="#Fragment" class="dr-link">Fragment</a>
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">svg</span>
@ -1546,7 +1557,7 @@ paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']
<span class="dr-description">SVG string</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Fragment">Fragment</em> <span class="dr-description">the <a href="#Fragment" class="dr-link">Fragment</a></span></p>
</div></section></article><article id="Snap.parsePathString" class="Snap-parsePathString-section"><header><h3 id="Snap.parsePathString" 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 1051 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1051">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.parsePathString" class="Snap-parsePathString-section"><header><h3 id="Snap.parsePathString" 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 1050 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1050">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.parsePathString-extra"></div><div class="dr-method"><p>Utility method
Parses given path string into an array of arrays of path segments
</p>
@ -1555,7 +1566,7 @@ Parses given path string into an array of arrays of path segments
<span class="dr-description">path string or array of segments (in the last case it is returned straight away)</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-array">array</em> <span class="dr-description">array of segments</span></p>
</div></section></article><article id="Snap.parseTransformString" class="Snap-parseTransformString-section"><header><h3 id="Snap.parseTransformString" 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#L1105">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.parseTransformString" class="Snap-parseTransformString-section"><header><h3 id="Snap.parseTransformString" 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 1104 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1104">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.parseTransformString-extra"></div><div class="dr-method"><p>Utility method
Parses given transform string into an array of transformations
</p>
@ -1817,7 +1828,7 @@ Converts path coordinates into relative values
<span class="dr-description">angle in degrees</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-number">number</em> <span class="dr-description">angle in radians</span></p>
</div></section></article><article id="Snap.rgb" class="Snap-rgb-section"><header><h3 id="Snap.rgb" 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 770 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L770">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.rgb" class="Snap-rgb-section"><header><h3 id="Snap.rgb" 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 769 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L769">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.rgb-extra"></div><div class="dr-method"><p>Converts RGB values to a hex representation of the color
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">r</span>
@ -1831,7 +1842,7 @@ Converts path coordinates into relative values
<span class="dr-description">blue</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-string">string</em> <span class="dr-description">hex representation of the color</span></p>
</div></section></article><article id="Snap.rgb2hsb" class="Snap-rgb2hsb-section"><header><h3 id="Snap.rgb2hsb" 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 984 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L984">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.rgb2hsb" class="Snap-rgb2hsb-section"><header><h3 id="Snap.rgb2hsb" 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 983 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L983">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.rgb2hsb-extra"></div><div class="dr-method"><p>Converts RGB values to an HSB object
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">r</span>
@ -1849,7 +1860,7 @@ Converts path coordinates into relative values
<li><span class="dr-json-key">s</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">saturation,</span>
<li><span class="dr-json-key">b</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">brightness</span>
</ol></li><li>}</li></ol>
</div></section></article><article id="Snap.rgb2hsl" class="Snap-rgb2hsl-section"><header><h3 id="Snap.rgb2hsl" 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 1017 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1017">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.rgb2hsl" class="Snap-rgb2hsl-section"><header><h3 id="Snap.rgb2hsl" 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 1016 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1016">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.rgb2hsl-extra"></div><div class="dr-method"><p>Converts RGB values to an HSL object
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">r</span>
@ -1867,7 +1878,7 @@ Converts path coordinates into relative values
<li><span class="dr-json-key">s</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">saturation,</span>
<li><span class="dr-json-key">l</span><span class="dr-type"><em class="dr-type-number">number</em></span><span class="dr-json-description">luminosity</span>
</ol></li><li>}</li></ol>
</div></section></article><article id="Snap.select" class="Snap-select-section"><header><h3 id="Snap.select" 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 1372 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1372">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.select" class="Snap-select-section"><header><h3 id="Snap.select" 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 1360 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1360">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.select-extra"></div><div class="dr-method"><p>Wraps a DOM element specified by CSS selector as <a href="#Element" class="dr-link">Element</a>
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">query</span>
@ -1875,7 +1886,7 @@ Converts path coordinates into relative values
<span class="dr-description">CSS selector of the element</span></li>
</ol></div>
<p class="dr-returns"><strong class="dr-title">Returns:</strong> <em class="dr-type-Element">Element</em> <span class="dr-description">the current element</span></p>
</div></section></article><article id="Snap.selectAll" class="Snap-selectAll-section"><header><h3 id="Snap.selectAll" 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 1383 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1383">&#x27ad;</a></h3></header>
</div></section></article><article id="Snap.selectAll" class="Snap-selectAll-section"><header><h3 id="Snap.selectAll" 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 1371 in the source" href="https://github.com/adobe-webplatform/savage/blob/master/src/svg.js#L1371">&#x27ad;</a></h3></header>
<section><div class="extra" id="Snap.selectAll-extra"></div><div class="dr-method"><p>Wraps DOM elements specified by CSS selector as set or array of <a href="#Element" class="dr-link">Element</a>
</p>
<div class="topcoat-list__container"><h3 class="topcoat-list__header">Parameters</h3><ol class="topcoat-list"><li class="topcoat-list__item"><span class="dr-param">query</span>

File diff suppressed because one or more lines are too long

52
dist/snap.svg.js vendored
View File

@ -14,7 +14,7 @@
// See the License for the specific language governing permissions and
// limitations under the License.
//
// build: 2013-10-15
// build: 2013-10-18
// Copyright (c) 2013 Adobe Systems Incorporated. All rights reserved.
//
// Licensed under the Apache License, Version 2.0 (the "License");
@ -1511,7 +1511,6 @@ function Matrix(a, b, c, d, e, f) {
this.f = out[1][2];
return this;
};
// SIERRA Matrix.invert(): Unclear what it means to invert a matrix.
/*\
* Matrix.invert
[ method ]
@ -1545,7 +1544,6 @@ function Matrix(a, b, c, d, e, f) {
matrixproto.translate = function (x, y) {
return this.add(1, 0, 0, 1, x, y);
};
// SIERRA: do cx/cy default to the center point, as in CSS? If so, Snap appears to resolve important discrepancies between how transforms behave in SVG & CSS.
/*\
* Matrix.scale
[ method ]
@ -1555,6 +1553,7 @@ function Matrix(a, b, c, d, e, f) {
- y (number) #optional amount to scale along the vertical axis. (Otherwise `x` applies to both axes.)
- cx (number) #optional horizontal origin point from which to scale
- cy (number) #optional vertical origin point from which to scale
* Default cx, cy is the middle point of the element.
\*/
matrixproto.scale = function (x, y, cx, cy) {
y == null && (y = x);
@ -2332,31 +2331,20 @@ function extractTransform(el, tstr) {
return new Matrix;
}
tstr = svgTransform2string(tstr);
} else if (!rgTransform.test(tstr)) {
tstr = svgTransform2string(tstr);
} else {
tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || E);
el._.transform = tstr;
if (!rgTransform.test(tstr)) {
tstr = svgTransform2string(tstr);
} else {
tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || E);
}
}
el._.transform = tstr;
var m = transform2matrix(tstr, el.getBBox(1));
if (doReturn) {
return m;
} else {
el.matrix = m;
}
// _.sx = sx;
// _.sy = sy;
// _.deg = deg;
// _.dx = dx = m.e;
// _.dy = dy = m.f;
//
// if (sx == 1 && sy == 1 && !deg && _.bbox) {
// _.bbox.x += +dx;
// _.bbox.y += +dy;
// } else {
// _.dirtyT = 1;
// }
}
Snap._unit2px = unit2px;
function getSomeDefs(el) {
@ -2652,7 +2640,7 @@ function arrayFirstValue(arr) {
return Snap._.box(_.bbox);
};
var propString = function () {
return this.local;
return this.string;
};
// SIERRA Element.transform(): seems to allow two return values, one of which (_Element_) is undefined.
// SIERRA Element.transform(): if this only accepts one argument, it's unclear how it can both _get_ and _set_ a transform.
@ -2681,14 +2669,17 @@ function arrayFirstValue(arr) {
var _ = this._;
if (tstr == null) {
var global = new Matrix(this.node.getCTM()),
local = extractTransform(this);
local = extractTransform(this),
localString = local.toTransformString(),
string = Str(local) == Str(this.matrix) ?
_.transform : localString;
return {
string: Str(_.transform) || "",
string: string,
globalMatrix: global,
localMatrix: local,
diffMatrix: global.clone().add(local.invert()),
global: global.toTransformString(),
local: local.toTransformString(),
local: localString,
toString: propString
};
}
@ -3168,10 +3159,6 @@ function arrayFirstValue(arr) {
}
return res;
};
// SIERRA unfamiliar with the phrase _caring function,_ so the text for the _setter_ param isn't clear.
// SIERRA With the animation's start/end states defined, how is its _speed_ distinguished from its _duration_?
// SIERRA Text explaining the mina format should move to the section on the mina object interface. (Prior comment applies: object interfaces need to also be documented.)
// SIERRA unclear how to express a custom _easing_ (+)
/*\
* Snap.animate
[ method ]
@ -3193,6 +3180,14 @@ function arrayFirstValue(arr) {
o status (function) gets or sets the status of the animation,
o stop (function) stops the animation
o }
| var rect = Snap().rect(0, 0, 10, 10);
| Snap.animate(0, 10, function (val) {
| rect.attr({
| x: val
| });
| }, 1000);
| // in given context is equivalent to
| rect.animate({x: 10}, 1000);
\*/
Snap.animate = function (from, to, setter, ms, easing, callback) {
if (typeof easing == "function" && !easing.length) {
@ -3204,7 +3199,6 @@ function arrayFirstValue(arr) {
callback && eve.once("mina.finish." + anim.id, callback);
return anim;
};
// SIERRA Element.stop(). Does it _stop_ or _pause_ the animations? If you run Element.animate() to restart the animation, does it commence from the beginning?
/*\
* Element.stop
[ method ]

View File

@ -414,7 +414,6 @@ function Matrix(a, b, c, d, e, f) {
this.f = out[1][2];
return this;
};
// SIERRA Matrix.invert(): Unclear what it means to invert a matrix.
/*\
* Matrix.invert
[ method ]
@ -448,7 +447,6 @@ function Matrix(a, b, c, d, e, f) {
matrixproto.translate = function (x, y) {
return this.add(1, 0, 0, 1, x, y);
};
// SIERRA: do cx/cy default to the center point, as in CSS? If so, Snap appears to resolve important discrepancies between how transforms behave in SVG & CSS.
/*\
* Matrix.scale
[ method ]
@ -458,6 +456,7 @@ function Matrix(a, b, c, d, e, f) {
- y (number) #optional amount to scale along the vertical axis. (Otherwise `x` applies to both axes.)
- cx (number) #optional horizontal origin point from which to scale
- cy (number) #optional vertical origin point from which to scale
* Default cx, cy is the middle point of the element.
\*/
matrixproto.scale = function (x, y, cx, cy) {
y == null && (y = x);
@ -1235,31 +1234,20 @@ function extractTransform(el, tstr) {
return new Matrix;
}
tstr = svgTransform2string(tstr);
} else if (!rgTransform.test(tstr)) {
tstr = svgTransform2string(tstr);
} else {
tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || E);
el._.transform = tstr;
if (!rgTransform.test(tstr)) {
tstr = svgTransform2string(tstr);
} else {
tstr = Str(tstr).replace(/\.{3}|\u2026/g, el._.transform || E);
}
}
el._.transform = tstr;
var m = transform2matrix(tstr, el.getBBox(1));
if (doReturn) {
return m;
} else {
el.matrix = m;
}
// _.sx = sx;
// _.sy = sy;
// _.deg = deg;
// _.dx = dx = m.e;
// _.dy = dy = m.f;
//
// if (sx == 1 && sy == 1 && !deg && _.bbox) {
// _.bbox.x += +dx;
// _.bbox.y += +dy;
// } else {
// _.dirtyT = 1;
// }
}
Snap._unit2px = unit2px;
function getSomeDefs(el) {
@ -1555,7 +1543,7 @@ function arrayFirstValue(arr) {
return Snap._.box(_.bbox);
};
var propString = function () {
return this.local;
return this.string;
};
// SIERRA Element.transform(): seems to allow two return values, one of which (_Element_) is undefined.
// SIERRA Element.transform(): if this only accepts one argument, it's unclear how it can both _get_ and _set_ a transform.
@ -1584,14 +1572,17 @@ function arrayFirstValue(arr) {
var _ = this._;
if (tstr == null) {
var global = new Matrix(this.node.getCTM()),
local = extractTransform(this);
local = extractTransform(this),
localString = local.toTransformString(),
string = Str(local) == Str(this.matrix) ?
_.transform : localString;
return {
string: Str(_.transform) || "",
string: string,
globalMatrix: global,
localMatrix: local,
diffMatrix: global.clone().add(local.invert()),
global: global.toTransformString(),
local: local.toTransformString(),
local: localString,
toString: propString
};
}