10900 lines
565 KiB
HTML
10900 lines
565 KiB
HTML
<!DOCTYPE html>
|
||
<html>
|
||
<head>
|
||
<meta charset="utf-8">
|
||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||
<base href="http://snapsvg.io/docs/">
|
||
<title>Snap.svg API Reference</title>
|
||
<link rel="shortcut icon" href="/assets/favicon.ico?v=1">
|
||
<meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width">
|
||
<link rel="stylesheet" href="/assets/docs/fonts/stylesheet.css?v=201311041519">
|
||
<link rel="stylesheet" href="/assets/docs/css/topcoat-desktop-light.css?v=201311041519">
|
||
<link rel="stylesheet" href="/assets/docs/css/main.css?v=201311041519">
|
||
<link rel="stylesheet" href="/assets/docs/css/dr.css?v=201311041519">
|
||
<link rel="stylesheet" href="/assets/docs/css/prism.css?v=201311041519">
|
||
<link rel="stylesheet" href="/assets/style/docs-header.css?v=201311041519">
|
||
<script>
|
||
var _gaq = _gaq || [];
|
||
_gaq.push(['_setAccount', 'UA-44948757-1']);
|
||
_gaq.push(['_trackPageview']);
|
||
|
||
(function() {
|
||
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
|
||
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
|
||
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
|
||
})();
|
||
|
||
function trackOutboundLink(link, category, action) {
|
||
try {
|
||
_gaq.push(['_trackEvent', category , action]);
|
||
} catch(err){}
|
||
|
||
setTimeout(function() {
|
||
document.location.href = link.href;
|
||
}, 100);
|
||
}
|
||
</script>
|
||
</head>
|
||
<body class="light">
|
||
|
||
<header id="header">
|
||
<div class="wrap">
|
||
<a href="/" class="logo">
|
||
<img src="/assets/images/logo.svg" alt=""/>
|
||
<span class="header">Snap.svg</span>
|
||
</a>
|
||
<nav>
|
||
<a href="/">Home</a>
|
||
<a href="/about/">Why Snap</a>
|
||
<a href="/start/" class="mobile-hide">Getting Started</a>
|
||
<a href="/docs/" class="mobile-hide selected">Docs</a>
|
||
<a href="/support/">Support</a>
|
||
<a href="/demos/" class="mobile-hide">Demos</a>
|
||
<a class="bt" href="/assets/downloads/Snap.svg-0.1.0.zip" onclick="trackOutboundLink(this, 'Download', '0.1');return false;">Download</a>
|
||
</nav>
|
||
</div>
|
||
</header>
|
||
|
||
<!--[if lt IE 9]>
|
||
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script><![endif]-->
|
||
|
||
<div id="wrapper">
|
||
<div class="max-width">
|
||
<div id="sideNav">
|
||
<div class="combo">
|
||
<input type="search" id="dr-filter" value="" placeholder="search" class="topcoat-search-input">
|
||
</div>
|
||
<div id="pageNav">
|
||
<ol id="dr-toc">
|
||
|
||
<li class="dr-lvl0">
|
||
<a href="#Element" class="undefined"><span>Element</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.add" class="dr-method"><span>Element.add()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.after" class="dr-method"><span>Element.after()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.animate" class="dr-method"><span>Element.animate()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.append" class="dr-method"><span>Element.append()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.appendTo" class="dr-method"><span>Element.appendTo()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.asPX" class="dr-method"><span>Element.asPX()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.attr" class="dr-method"><span>Element.attr()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.before" class="dr-method"><span>Element.before()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.click" class="dr-method"><span>Element.click()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.clone" class="dr-method"><span>Element.clone()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.data" class="dr-method"><span>Element.data()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.dblclick" class="dr-method"><span>Element.dblclick()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.drag" class="dr-method"><span>Element.drag()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.getBBox" class="dr-method"><span>Element.getBBox()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.getPointAtLength" class="dr-method"><span>Element.getPointAtLength()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.getSubpath" class="dr-method"><span>Element.getSubpath()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.getTotalLength" class="dr-method"><span>Element.getTotalLength()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.hover" class="dr-method"><span>Element.hover()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.inAnim" class="dr-method"><span>Element.inAnim()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.innerSVG" class="dr-method"><span>Element.innerSVG()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.insertAfter" class="dr-method"><span>Element.insertAfter()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.insertBefore" class="dr-method"><span>Element.insertBefore()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.marker" class="dr-method"><span>Element.marker()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.mousedown" class="dr-method"><span>Element.mousedown()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.mousemove" class="dr-method"><span>Element.mousemove()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.mouseout" class="dr-method"><span>Element.mouseout()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.mouseover" class="dr-method"><span>Element.mouseover()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.mouseup" class="dr-method"><span>Element.mouseup()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.node" class="dr-property"><span>Element.node</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.outerSVG" class="dr-method"><span>Element.outerSVG()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.parent" class="dr-method"><span>Element.parent()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.pattern" class="dr-method"><span>Element.pattern()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.prepend" class="dr-method"><span>Element.prepend()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.prependTo" class="dr-method"><span>Element.prependTo()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.remove" class="dr-method"><span>Element.remove()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.removeData" class="dr-method"><span>Element.removeData()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.select" class="dr-method"><span>Element.select()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.selectAll" class="dr-method"><span>Element.selectAll()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.stop" class="dr-method"><span>Element.stop()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.toDefs" class="dr-method"><span>Element.toDefs()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.toPattern" class="dr-method"><span>Element.toPattern()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.toString" class="dr-method"><span>Element.toString()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.touchcancel" class="dr-method"><span>Element.touchcancel()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.touchend" class="dr-method"><span>Element.touchend()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.touchmove" class="dr-method"><span>Element.touchmove()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.touchstart" class="dr-method"><span>Element.touchstart()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.transform" class="dr-method"><span>Element.transform()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.type" class="dr-property"><span>Element.type</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.unclick" class="dr-method"><span>Element.unclick()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.undblclick" class="dr-method"><span>Element.undblclick()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.undrag" class="dr-method"><span>Element.undrag()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.unhover" class="dr-method"><span>Element.unhover()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.unmousedown" class="dr-method"><span>Element.unmousedown()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.unmousemove" class="dr-method"><span>Element.unmousemove()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.unmouseout" class="dr-method"><span>Element.unmouseout()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.unmouseover" class="dr-method"><span>Element.unmouseover()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.unmouseup" class="dr-method"><span>Element.unmouseup()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.untouchcancel" class="dr-method"><span>Element.untouchcancel()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.untouchend" class="dr-method"><span>Element.untouchend()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.untouchmove" class="dr-method"><span>Element.untouchmove()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.untouchstart" class="dr-method"><span>Element.untouchstart()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Element.use" class="dr-method"><span>Element.use()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl0">
|
||
<a href="#Fragment" class="undefined"><span>Fragment</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Fragment.select" class="dr-method"><span>Fragment.select()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Fragment.selectAll" class="dr-method"><span>Fragment.selectAll()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl0">
|
||
<a href="#Paper" class="undefined"><span>Paper</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Paper.el" class="dr-method"><span>Paper.el()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Paper.filter" class="dr-method"><span>Paper.filter()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl0">
|
||
<a href="#Set" class="undefined"><span>Set</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Set.bind" class="dr-method"><span>Set.bind()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Set.clear" class="dr-method"><span>Set.clear()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Set.exclude" class="dr-method"><span>Set.exclude()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Set.forEach" class="dr-method"><span>Set.forEach()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Set.pop" class="dr-method"><span>Set.pop()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Set.push" class="dr-method"><span>Set.push()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Set.splice" class="dr-method"><span>Set.splice()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl0">
|
||
<a href="#Snap" class="dr-method"><span>Snap()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.ajax" class="dr-method"><span>Snap.ajax()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.angle" class="dr-method"><span>Snap.angle()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.animate" class="dr-method"><span>Snap.animate()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.animation" class="dr-method"><span>Snap.animation()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.color" class="dr-method"><span>Snap.color()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.deg" class="dr-method"><span>Snap.deg()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.filter" class="undefined"><span>Snap.filter</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.filter.blur" class="dr-method"><span>Snap.filter.blur()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.filter.brightness" class="dr-method"><span>Snap.filter.brightness()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.filter.contrast" class="dr-method"><span>Snap.filter.contrast()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.filter.grayscale" class="dr-method"><span>Snap.filter.grayscale()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.filter.hueRotate" class="dr-method"><span>Snap.filter.hueRotate()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.filter.invert" class="dr-method"><span>Snap.filter.invert()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.filter.saturate" class="dr-method"><span>Snap.filter.saturate()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.filter.sepia" class="dr-method"><span>Snap.filter.sepia()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.filter.shadow" class="dr-method"><span>Snap.filter.shadow()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.format" class="dr-method"><span>Snap.format()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.fragment" class="dr-method"><span>Snap.fragment()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.getElementByPoint" class="dr-method"><span>Snap.getElementByPoint()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.getRGB" class="dr-method"><span>Snap.getRGB()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.hsb" class="dr-method"><span>Snap.hsb()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.hsb2rgb" class="dr-method"><span>Snap.hsb2rgb()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.hsl" class="dr-method"><span>Snap.hsl()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.hsl2rgb" class="dr-method"><span>Snap.hsl2rgb()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.is" class="dr-method"><span>Snap.is()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.load" class="dr-method"><span>Snap.load()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.parse" class="dr-method"><span>Snap.parse()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.parsePathString" class="dr-method"><span>Snap.parsePathString()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.parseTransformString" class="dr-method"><span>Snap.parseTransformString()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.path" class="undefined"><span>Snap.path</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.path.bezierBBox" class="dr-method"><span>Snap.path.bezierBBox()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.path.findDotsAtSegment" class="dr-method"><span>Snap.path.findDotsAtSegment()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.path.getBBox" class="dr-method"><span>Snap.path.getBBox()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.path.getPointAtLength" class="dr-method"><span>Snap.path.getPointAtLength()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.path.getSubpath" class="dr-method"><span>Snap.path.getSubpath()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.path.getTotalLength" class="dr-method"><span>Snap.path.getTotalLength()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.path.intersection" class="dr-method"><span>Snap.path.intersection()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.path.isBBoxIntersect" class="dr-method"><span>Snap.path.isBBoxIntersect()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.path.isPointInside" class="dr-method"><span>Snap.path.isPointInside()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.path.isPointInsideBBox" class="dr-method"><span>Snap.path.isPointInsideBBox()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.path.map" class="dr-method"><span>Snap.path.map()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.path.toAbsolute" class="dr-method"><span>Snap.path.toAbsolute()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.path.toCubic" class="dr-method"><span>Snap.path.toCubic()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl2">
|
||
<a href="#Snap.path.toRelative" class="dr-method"><span>Snap.path.toRelative()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.plugin" class="dr-method"><span>Snap.plugin()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.rad" class="dr-method"><span>Snap.rad()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.rgb" class="dr-method"><span>Snap.rgb()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.rgb2hsb" class="dr-method"><span>Snap.rgb2hsb()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.rgb2hsl" class="dr-method"><span>Snap.rgb2hsl()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.select" class="dr-method"><span>Snap.select()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.selectAll" class="dr-method"><span>Snap.selectAll()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#Snap.snapTo" class="dr-method"><span>Snap.snapTo()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl0">
|
||
<a href="#mina" class="dr-method"><span>mina()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#mina.backin" class="dr-method"><span>mina.backin()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#mina.backout" class="dr-method"><span>mina.backout()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#mina.bounce" class="dr-method"><span>mina.bounce()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#mina.easein" class="dr-method"><span>mina.easein()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#mina.easeinout" class="dr-method"><span>mina.easeinout()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#mina.easeout" class="dr-method"><span>mina.easeout()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#mina.elastic" class="dr-method"><span>mina.elastic()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#mina.getById" class="dr-method"><span>mina.getById()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#mina.linear" class="dr-method"><span>mina.linear()</span></a>
|
||
</li>
|
||
|
||
<li class="dr-lvl1">
|
||
<a href="#mina.time" class="dr-method"><span>mina.time()</span></a>
|
||
</li>
|
||
|
||
</ol>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
<div id="site">
|
||
<div id="content" class="max-width">
|
||
|
||
<article id="Snap">
|
||
<header>
|
||
<h3 class="dr-method">Snap(…)<a href="#Snap" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 33 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L33">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Creates a drawing surface or wraps existing SVG 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">width</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> <em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">width of surface</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">height</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> <em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">height of surface</span></li>
|
||
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p>or
|
||
</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">DOM</span>
|
||
<span class="dr-type"><em class="dr-type-SVGElement">SVGElement</em> </span>
|
||
<span class="dr-description">element to be wrapped into Snap structure</span></li>
|
||
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p>or
|
||
</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">array</span>
|
||
<span class="dr-type"><em class="dr-type-array">array</em> </span>
|
||
<span class="dr-description">array of elements (will return set of elements)</span></li>
|
||
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p>or
|
||
</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">CSS query selector</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="Snap.format">
|
||
<header>
|
||
<h3 class="dr-method">Snap.format(token, json)<a href="#Snap.format" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 189 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L189">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.format-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Replaces construction of type <code>{<name>}</code> to the corresponding argument
|
||
</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">token</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">string to format</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">json</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-description">object which properties are used as a replacement</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">formatted string</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Usage</h3>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">// this draws a rectangular shape equivalent to "M10,20h40v50h-40z"
|
||
paper.path(Snap.format("M{x},{y}h{dim.width}v{dim.height}h{dim['negative width']}z", {
|
||
x: 10,
|
||
y: 20,
|
||
dim: {
|
||
width: 40,
|
||
height: 50,
|
||
"negative width": -40
|
||
}
|
||
}));</code></pre></section>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.rad">
|
||
<header>
|
||
<h3 class="dr-method">Snap.rad(deg)<a href="#Snap.rad" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 279 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L279">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.rad-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Transform angle to radians
|
||
</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">deg</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<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.deg">
|
||
<header>
|
||
<h3 class="dr-method">Snap.deg(rad)<a href="#Snap.deg" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 288 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L288">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.deg-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Transform angle to degrees
|
||
</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">rad</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">angle in radians</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.angle">
|
||
<header>
|
||
<h3 class="dr-method">Snap.angle(x1, y1, x2, y2, [x3], [y3])<a href="#Snap.angle" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 303 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L303">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.angle-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns an angle between two or three points
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Parameters</h3>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<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>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">x coord of first point</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">y1</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">y coord of first point</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">x2</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">x coord of second point</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">y2</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">y coord of second point</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">x3</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">x coord of third point</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">y3</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<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.is">
|
||
<header>
|
||
<h3 class="dr-method">Snap.is(o, type)<a href="#Snap.is" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 313 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L313">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.is-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Handy replacement for the <code>typeof</code> operator
|
||
</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">o</span>
|
||
<span class="dr-type"><em class="dr-type-…">…</em> </span>
|
||
<span class="dr-description">any object or primitive</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">type</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<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.snapTo">
|
||
<header>
|
||
<h3 class="dr-method">Snap.snapTo(values, value, [tolerance])<a href="#Snap.snapTo" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 324 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L324">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.snapTo-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Snaps given value to given grid
|
||
</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">values</span>
|
||
<span class="dr-type"><em class="dr-type-array">array</em> <em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">given array of values or step of the grid</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">value</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">value to adjust</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">tolerance</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">maximum distance to the target value that would trigger the snap. Default is <code>10</code>.</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">adjusted value</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.getRGB">
|
||
<header>
|
||
<h3 class="dr-method">Snap.getRGB(color)<a href="#Snap.getRGB" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 377 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L377">➭</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">color string in one of the following formats:</span></li>
|
||
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ul>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li>Color name (<code>red</code>, <code>green</code>, <code>cornflowerblue</code>, etc)</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li>#••• — shortened HTML color: (<code>#000</code>, <code>#fc0</code>, etc.)</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li>#•••••• — full length HTML color: (<code>#000000</code>, <code>#bd2300</code>)</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li>rgb(•••, •••, •••) — red, green and blue channels values: (<code>rgb(200, 100, 0)</code>)</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li>rgba(•••, •••, •••, •••) — also with opacity</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li>rgb(•••%, •••%, •••%) — same as above, but in %: (<code>rgb(100%, 175%, 0%)</code>)</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li>rgba(•••%, •••%, •••%, •••%) — also with opacity</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li>hsb(•••, •••, •••) — hue, saturation and brightness values: (<code>hsb(0.5, 0.25, 1)</code>)</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li>hsba(•••, •••, •••, •••) — also with opacity</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li>hsb(•••%, •••%, •••%) — same as above, but in %</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li>hsba(•••%, •••%, •••%, •••%) — also with opacity</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li>hsl(•••, •••, •••) — hue, saturation and luminosity values: (<code>hsb(0.5, 0.25, 0.5)</code>)</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li>hsla(•••, •••, •••, •••) — also with opacity</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li>hsl(•••%, •••%, •••%) — same as above, but in %</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<li>hsla(•••%, •••%, •••%, •••%) — also with opacity</li>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</ul>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p>Note that <code>%</code> can be used any time: <code>rgb(20%, 255, 50%)</code>.
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p class="dr-returns">
|
||
<strong class="dr-title">Returns:</strong>
|
||
|
||
<em class="dr-type-object">object</em>
|
||
|
||
<span class="dr-description">RGB object in the following format:</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">r</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">red,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">g</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">green,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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>
|
||
|
||
|
||
|
||
<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>
|
||
|
||
|
||
|
||
<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't be parsed</span>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.hsb">
|
||
<header>
|
||
<h3 class="dr-method">Snap.hsb(h, s, b)<a href="#Snap.hsb" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 466 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L466">➭</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>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">hue</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">s</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">saturation</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">b</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<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.hsl">
|
||
<header>
|
||
<h3 class="dr-method">Snap.hsl(h, s, l)<a href="#Snap.hsl" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 479 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L479">➭</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>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">hue</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">s</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">saturation</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">l</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<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.rgb">
|
||
<header>
|
||
<h3 class="dr-method">Snap.rgb(r, g, b)<a href="#Snap.rgb" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 492 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L492">➭</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>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">red</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">g</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">green</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">b</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<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.color">
|
||
<header>
|
||
<h3 class="dr-method">Snap.color(clr)<a href="#Snap.color" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 579 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L579">➭</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'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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">color string in one of the supported formats (see <a href="#Snap.getRGB" class="dr-link">Snap.getRGB</a>)</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">Combined RGB/HSB object in the following format:</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">r</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">red,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">g</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">green,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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>
|
||
|
||
|
||
|
||
<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>
|
||
|
||
|
||
|
||
<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"><code>true</code> if string can't be parsed,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">h</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">hue,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">v</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">value (brightness),</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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">lightness</span>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.hsb2rgb">
|
||
<header>
|
||
<h3 class="dr-method">Snap.hsb2rgb(h, s, v)<a href="#Snap.hsb2rgb" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 631 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L631">➭</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>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">hue</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">s</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">saturation</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">v</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<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-object">object</em>
|
||
|
||
<span class="dr-description">RGB object in the following format:</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">r</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">red,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">g</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">green,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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>
|
||
|
||
|
||
|
||
<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>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.hsl2rgb">
|
||
<header>
|
||
<h3 class="dr-method">Snap.hsl2rgb(h, s, l)<a href="#Snap.hsl2rgb" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 667 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L667">➭</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>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">hue</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">s</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">saturation</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">l</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">luminosity</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">RGB object in the following format:</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">r</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">red,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">g</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">green,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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>
|
||
|
||
|
||
|
||
<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>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.rgb2hsb">
|
||
<header>
|
||
<h3 class="dr-method">Snap.rgb2hsb(r, g, b)<a href="#Snap.rgb2hsb" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 706 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L706">➭</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>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">red</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">g</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">green</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">b</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">blue</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">HSB object in the following format:</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">h</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">hue,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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>
|
||
|
||
|
||
|
||
<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>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.rgb2hsl">
|
||
<header>
|
||
<h3 class="dr-method">Snap.rgb2hsl(r, g, b)<a href="#Snap.rgb2hsl" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 739 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L739">➭</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>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">red</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">g</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">green</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">b</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">blue</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">HSL object in the following format:</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">h</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">hue,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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>
|
||
|
||
|
||
|
||
<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>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.parsePathString">
|
||
<header>
|
||
<h3 class="dr-method">Snap.parsePathString(pathString)<a href="#Snap.parsePathString" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 773 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L773">➭</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>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<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">pathString</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> <em class="dr-type-array">array</em> </span>
|
||
<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">
|
||
<header>
|
||
<h3 class="dr-method">Snap.parseTransformString(TString)<a href="#Snap.parseTransformString" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 826 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L826">➭</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>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<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">TString</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> <em class="dr-type-array">array</em> </span>
|
||
<span class="dr-description">transform string or array of transformations (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 transformations</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.select">
|
||
<header>
|
||
<h3 class="dr-method">Snap.select(query)<a href="#Snap.select" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1105 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1105">➭</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<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">
|
||
<header>
|
||
<h3 class="dr-method">Snap.selectAll(query)<a href="#Snap.selectAll" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1116 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1116">➭</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<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="Element.node">
|
||
<header>
|
||
<h3 class="dr-property">Element.node(x, y, width, height, refX, refY)<a href="#Element.node" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1179 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1179">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.node-extra"></div>
|
||
<div class="dr-property">
|
||
|
||
|
||
|
||
|
||
<p>Gives you a reference to the DOM object, so you can assign event handlers or just mess around.
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Usage</h3>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">// draw a circle at coordinate 10,10 with radius of 10
|
||
var c = paper.circle(10, 10, 10);
|
||
c.node.onclick = function () {
|
||
c.attr("fill", "red");
|
||
};</code></pre></section>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.type">
|
||
<header>
|
||
<h3 class="dr-property">Element.type(tstr)<a href="#Element.type" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1189 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1189">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.type-extra"></div>
|
||
<div class="dr-property">
|
||
|
||
|
||
|
||
|
||
<p>SVG tag name of the given element.
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.attr">
|
||
<header>
|
||
<h3 class="dr-method">Element.attr(…)<a href="#Element.attr" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1236 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1236">➭</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>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-description">contains key-value pairs of attributes you want to set</span></li>
|
||
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p>or
|
||
</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">param</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">name of the attribute</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>
|
||
|
||
|
||
|
||
|
||
|
||
<p>or
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p class="dr-returns">
|
||
<strong class="dr-title">Returns:</strong>
|
||
|
||
<em class="dr-type-string">string</em>
|
||
|
||
<span class="dr-description">value of attribute</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Usage</h3>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">el.attr({
|
||
fill: "#fc0",
|
||
stroke: "#000",
|
||
strokeWidth: 2, // CamelCase...
|
||
"fill-opacity": 0.5 // or dash-separated names
|
||
});
|
||
console.log(el.attr("fill")); // #fc0</code></pre></section>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.getBBox">
|
||
<header>
|
||
<h3 class="dr-method">Element.getBBox()<a href="#Element.getBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1283 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1283">➭</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>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">cx:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x of the center,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">cy:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x of the center,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">h:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">height,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">height:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">height,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">path:</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-json-description">path command for the box,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">r0:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">radius of a circle that fully encloses the box,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">r1:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">radius of the smallest circle that can be enclosed,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">r2:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">radius of the largest circle that can be enclosed,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">vb:</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-json-description">box as a viewbox command,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">w:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">width,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">width:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">width,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x2:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x of the right side,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x of the left side,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y2:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y of the bottom edge,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y of the top edge</span>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.transform">
|
||
<header>
|
||
<h3 class="dr-method">Element.transform(tstr)<a href="#Element.transform" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1330 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1330">➭</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">transform string in Snap or SVG format</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>
|
||
|
||
|
||
|
||
|
||
|
||
<p>or
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p class="dr-returns">
|
||
<strong class="dr-title">Returns:</strong>
|
||
|
||
<em class="dr-type-object">object</em>
|
||
|
||
<span class="dr-description">transformation descriptor:</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">string</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-json-description">transform string,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">globalMatrix</span>
|
||
<span class="dr-type"><em class="dr-type-Matrix">Matrix</em> </span>
|
||
<span class="dr-json-description">matrix of all transformations applied to element or its parents,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">localMatrix</span>
|
||
<span class="dr-type"><em class="dr-type-Matrix">Matrix</em> </span>
|
||
<span class="dr-json-description">matrix of transformations applied only to the element,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">diffMatrix</span>
|
||
<span class="dr-type"><em class="dr-type-Matrix">Matrix</em> </span>
|
||
<span class="dr-json-description">matrix of difference between global and local transformations,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">global</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-json-description">global transformation as string,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">local</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-json-description">local transformation as string,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">toString</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-json-description">returns <code>string</code> property</span>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.parent">
|
||
<header>
|
||
<h3 class="dr-method">Element.parent()<a href="#Element.parent" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1387 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1387">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.parent-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns the element'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.append">
|
||
<header>
|
||
<h3 class="dr-method">Element.append(el)<a href="#Element.append" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1399 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1399">➭</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>
|
||
<span class="dr-type"><em class="dr-type-Element">Element</em> <em class="dr-type-Set">Set</em> </span>
|
||
<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.add">
|
||
<header>
|
||
<h3 class="dr-method">Element.add()<a href="#Element.add" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1405 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1405">➭</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.appendTo">
|
||
<header>
|
||
<h3 class="dr-method">Element.appendTo(el)<a href="#Element.appendTo" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1429 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1429">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.appendTo-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Appends the current element to 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>
|
||
<span class="dr-type"><em class="dr-type-Element">Element</em> </span>
|
||
<span class="dr-description">parent element to append 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 child element</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.prepend">
|
||
<header>
|
||
<h3 class="dr-method">Element.prepend(el)<a href="#Element.prepend" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1445 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1445">➭</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>
|
||
<span class="dr-type"><em class="dr-type-Element">Element</em> </span>
|
||
<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.prependTo">
|
||
<header>
|
||
<h3 class="dr-method">Element.prependTo(el)<a href="#Element.prependTo" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1466 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1466">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.prependTo-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Prepends the current element to 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>
|
||
<span class="dr-type"><em class="dr-type-Element">Element</em> </span>
|
||
<span class="dr-description">parent element to prepend 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 child element</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.before">
|
||
<header>
|
||
<h3 class="dr-method">Element.before(el)<a href="#Element.before" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1480 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1480">➭</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>
|
||
<span class="dr-type"><em class="dr-type-Element">Element</em> </span>
|
||
<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.after">
|
||
<header>
|
||
<h3 class="dr-method">Element.after(el)<a href="#Element.after" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1508 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1508">➭</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>
|
||
<span class="dr-type"><em class="dr-type-Element">Element</em> </span>
|
||
<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.insertBefore">
|
||
<header>
|
||
<h3 class="dr-method">Element.insertBefore(el)<a href="#Element.insertBefore" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1530 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1530">➭</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>
|
||
<span class="dr-type"><em class="dr-type-Element">Element</em> </span>
|
||
<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.insertAfter">
|
||
<header>
|
||
<h3 class="dr-method">Element.insertAfter(el)<a href="#Element.insertAfter" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1548 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1548">➭</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>
|
||
<span class="dr-type"><em class="dr-type-Element">Element</em> </span>
|
||
<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.remove">
|
||
<header>
|
||
<h3 class="dr-method">Element.remove()<a href="#Element.remove" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1564 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1564">➭</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.select">
|
||
<header>
|
||
<h3 class="dr-method">Element.select(query)<a href="#Element.select" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1581 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1581">➭</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<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">
|
||
<header>
|
||
<h3 class="dr-method">Element.selectAll(query)<a href="#Element.selectAll" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1593 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1593">➭</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<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.asPX">
|
||
<header>
|
||
<h3 class="dr-method">Element.asPX(attr, [value])<a href="#Element.asPX" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1611 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1611">➭</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">attribute name</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">value</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<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.use">
|
||
<header>
|
||
<h3 class="dr-method">Element.use()<a href="#Element.use" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1626 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1626">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.use-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Creates a <code><use></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><use></code> element</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.clone">
|
||
<header>
|
||
<h3 class="dr-method">Element.clone()<a href="#Element.clone" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1655 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1655">➭</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.toDefs">
|
||
<header>
|
||
<h3 class="dr-method">Element.toDefs()<a href="#Element.toDefs" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1826 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1826">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.toDefs-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Moves element to the shared <code><defs></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 element</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.pattern">
|
||
<header>
|
||
<h3 class="dr-method">Element.pattern()<a href="#Element.pattern" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1837 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1837">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.pattern-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Depricated. Use <a href="#Element.toPattern" class="dr-link">Element.toPattern</a> instead.
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.toPattern">
|
||
<header>
|
||
<h3 class="dr-method">Element.toPattern(x, y, width, height)<a href="#Element.toPattern" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1860 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1860">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.toPattern-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Creates a <code><pattern></code> element from the current element
|
||
To create a pattern you have to specify the pattern rect:
|
||
</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> <em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description"></span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">y</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> <em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description"></span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">width</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> <em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description"></span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">height</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> <em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description"></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 <code><pattern></code> element</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
<p>You can use pattern later on as an argument for <code>fill</code> attribute:
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var p = paper.path("M10-5-10,15M15,0,0,15M0-5-20,15").attr({
|
||
fill: "none",
|
||
stroke: "#bada55",
|
||
strokeWidth: 5
|
||
}).pattern(0, 0, 10, 10),
|
||
c = paper.circle(200, 200, 100);
|
||
c.attr({
|
||
fill: p
|
||
});</code></pre></section>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.marker">
|
||
<header>
|
||
<h3 class="dr-method">Element.marker(x, y, width, height, refX, refY)<a href="#Element.marker" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1901 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1901">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.marker-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Creates a <code><marker></code> element from the current element
|
||
To create a marker you have to specify the bounding rect and reference point:
|
||
</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>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description"></span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">y</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description"></span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">width</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description"></span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">height</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description"></span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">refX</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description"></span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">refY</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description"></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 <code><marker></code> element</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
<p>You can specify the marker later as an argument for <code>marker-start</code>, <code>marker-end</code>, <code>marker-mid</code>, and <code>marker</code> attributes. The <code>marker</code> attribute places the marker at every point along the path, and <code>marker-mid</code> places them at every point except the start and end.
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.animation">
|
||
<header>
|
||
<h3 class="dr-method">Snap.animation(attr, duration, [easing], [callback])<a href="#Snap.animation" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1960 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1960">➭</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>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-description">attributes of final destination</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">duration</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">duration of the animation, in milliseconds</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">easing</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">one of easing functions of <a href="#mina" class="dr-link">mina</a> or custom one</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">callback</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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="Element.inAnim">
|
||
<header>
|
||
<h3 class="dr-method">Element.inAnim()<a href="#Element.inAnim" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1978 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1978">➭</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>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">anim</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-json-description">animation object,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">mina</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-json-description"><a href="#mina" class="dr-link">mina</a> object,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">curStatus</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">0..1 — status of the animation: 0 — just started, 1 — just finished,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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>
|
||
|
||
|
||
|
||
<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>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.animate">
|
||
<header>
|
||
<h3 class="dr-method">Snap.animate(from, to, setter, duration, [easing], [callback])<a href="#Snap.animate" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2028 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2028">➭</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>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> <em class="dr-type-array">array</em> </span>
|
||
<span class="dr-description">number or array of numbers</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">to</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> <em class="dr-type-array">array</em> </span>
|
||
<span class="dr-description">number or array of numbers</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">setter</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">caring function that accepts one number argument</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">duration</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">duration, in milliseconds</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">easing</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">easing function from <a href="#mina" class="dr-link">mina</a> or custom</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">callback</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">callback function to execute 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 in <a href="#mina" class="dr-link">mina</a> format</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">id</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-json-description">animation id, consider it read-only,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">duration</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-json-description">gets or sets the duration of the animation,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">easing</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-json-description">easing,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">speed</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-json-description">gets or sets the speed of the animation,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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>
|
||
|
||
|
||
|
||
<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>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<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="Element.stop">
|
||
<header>
|
||
<h3 class="dr-method">Element.stop()<a href="#Element.stop" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2046 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2046">➭</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.animate">
|
||
<header>
|
||
<h3 class="dr-method">Element.animate(attrs, duration, [easing], [callback])<a href="#Element.animate" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2067 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2067">➭</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>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-description">key-value pairs of destination attributes</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">duration</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">duration of the animation in milliseconds</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">easing</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">easing function from <a href="#mina" class="dr-link">mina</a> or custom</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">callback</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.data">
|
||
<header>
|
||
<h3 class="dr-method">Element.data(key, [value])<a href="#Element.data" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2140 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2140">➭</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. (Don’t confuse
|
||
with <code>data-</code> attributes)
|
||
</p><p>See also <a href="#Element.removeData" class="dr-link">Element.removeData</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">key</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">key to store data</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">value</span>
|
||
<span class="dr-type"><em class="dr-type-any">any</em> </span>
|
||
<span class="dr-description">value to store</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>
|
||
|
||
|
||
|
||
|
||
|
||
<p>or, if value is not specified:
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p class="dr-returns">
|
||
<strong class="dr-title">Returns:</strong>
|
||
|
||
<em class="dr-type-any">any</em>
|
||
|
||
<span class="dr-description">value</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Usage</h3>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">for (var i = 0, i < 5, i++) {
|
||
paper.circle(10 + 15 * i, 10, 10)
|
||
.attr({fill: "#000"})
|
||
.data("i", i)
|
||
.click(function () {
|
||
alert(this.data("i"));
|
||
});
|
||
}</code></pre></section>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.removeData">
|
||
<header>
|
||
<h3 class="dr-method">Element.removeData([key])<a href="#Element.removeData" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2169 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2169">➭</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>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<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">key</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<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.outerSVG">
|
||
<header>
|
||
<h3 class="dr-method">Element.outerSVG()<a href="#Element.outerSVG" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2186 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2186">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.outerSVG-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns SVG code for the element, equivalent to HTML's <code>outerHTML</code>.
|
||
</p><p>See also <a href="#Element.innerSVG" class="dr-link">Element.innerSVG</a>
|
||
</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.toString">
|
||
<header>
|
||
<h3 class="dr-method">Element.toString()<a href="#Element.toString" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2192 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2192">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.toString-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>See <a href="#Element.outerSVG" class="dr-link">Element.outerSVG</a>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.innerSVG">
|
||
<header>
|
||
<h3 class="dr-method">Element.innerSVG()<a href="#Element.innerSVG" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2200 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2200">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.innerSVG-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns SVG code for the element's contents, equivalent to HTML'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="Snap.parse">
|
||
<header>
|
||
<h3 class="dr-method">Snap.parse(svg)<a href="#Snap.parse" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2238 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2238">➭</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<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="Fragment.select">
|
||
<header>
|
||
<h3 class="dr-method">Fragment.select()<a href="#Fragment.select" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2270 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2270">➭</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">
|
||
<header>
|
||
<h3 class="dr-method">Fragment.selectAll()<a href="#Fragment.selectAll" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2277 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2277">➭</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="Snap.fragment">
|
||
<header>
|
||
<h3 class="dr-method">Snap.fragment(varargs)<a href="#Snap.fragment" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2288 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2288">➭</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>
|
||
<span class="dr-type"><em class="dr-type-…">…</em> </span>
|
||
<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="Paper.el">
|
||
<header>
|
||
<h3 class="dr-method">Paper.el(name, attr)<a href="#Paper.el" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2391 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2391">➭</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">tag name</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">attr</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-description">attributes</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>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Usage</h3>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var c = paper.circle(10, 10, 10); // is the same as...
|
||
var c = paper.el("circle").attr({
|
||
cx: 10,
|
||
cy: 10,
|
||
r: 10
|
||
});
|
||
// and the same as
|
||
var c = paper.el("circle", {
|
||
cx: 10,
|
||
cy: 10,
|
||
r: 10
|
||
});</code></pre></section>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.ajax">
|
||
<header>
|
||
<h3 class="dr-method">Snap.ajax(…)<a href="#Snap.ajax" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2509 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2509">➭</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">URL</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">postData</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> <em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">data for post request</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">callback</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">callback</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">scope</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-description">scope of callback</span></li>
|
||
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p>or
|
||
</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">URL</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">callback</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">callback</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">scope</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-description">scope of callback</span></li>
|
||
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p class="dr-returns">
|
||
<strong class="dr-title">Returns:</strong>
|
||
|
||
<em class="dr-type-XMLHttpRequest">XMLHttpRequest</em>
|
||
|
||
<span class="dr-description">the XMLHttpRequest object, just in case</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.load">
|
||
<header>
|
||
<h3 class="dr-method">Snap.load(url, callback, [scope])<a href="#Snap.load" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2555 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2555">➭</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">URL</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">callback</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">callback</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">scope</span>
|
||
<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.getElementByPoint">
|
||
<header>
|
||
<h3 class="dr-method">Snap.getElementByPoint(x, y)<a href="#Snap.getElementByPoint" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2586 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2586">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.getElementByPoint-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns you topmost element under given point.
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p class="dr-returns">
|
||
<strong class="dr-title">Returns:</strong>
|
||
|
||
<em class="dr-type-object">object</em>
|
||
|
||
<span class="dr-description">Snap element object</span>
|
||
</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>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">x coordinate from the top left corner of the window</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">y</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">y coordinate from the top left corner of the window</span></li>
|
||
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Usage</h3>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">Snap.getElementByPoint(mouseX, mouseY).attr({stroke: "#f00"});</code></pre></section>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.plugin">
|
||
<header>
|
||
<h3 class="dr-method">Snap.plugin(f)<a href="#Snap.plugin" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 2621 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L2621">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.plugin-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Let you write plugins. You pass in a function with four arguments, like this:
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">Snap.plugin(function (Snap, Element, Paper, global, Fragment) {
|
||
Snap.newmethod = function () {};
|
||
Element.prototype.newmethod = function () {};
|
||
Paper.prototype.newmethod = function () {};
|
||
});</code></pre></section>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p>Inside the function you have access to all main objects (and their
|
||
prototypes). This allow you to extend anything you want.
|
||
</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">f</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">your plugin body</span></li>
|
||
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="mina">
|
||
<header>
|
||
<h3 class="dr-method">mina(a, A, b, B, get, set, [easing])<a href="#mina" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 168 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L168">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="mina-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Generic animation of numbers
|
||
</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>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">start <em>slave</em> number</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">A</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">end <em>slave</em> number</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">b</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">start <em>master</em> number (start time in general case)</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">B</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">end <em>master</em> number (end time in gereal case)</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">get</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">getter of <em>master</em> number (see <a href="#mina.time" class="dr-link">mina.time</a>)</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">set</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">setter of <em>slave</em> number</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">easing</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">easing function, default is <a href="#mina.linear" class="dr-link">mina.linear</a></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 descriptor</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">id</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-json-description">animation id,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">start</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">start <em>slave</em> number,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">end</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">end <em>slave</em> number,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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">start <em>master</em> number,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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">animation status (0..1),</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">dur</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">animation duration,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">spd</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">animation speed,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">get</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-json-description">getter of <em>master</em> number (see <a href="#mina.time" class="dr-link">mina.time</a>),</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">set</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-json-description">setter of <em>slave</em> number,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">easing</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-json-description">easing function, default is <a href="#mina.linear" class="dr-link">mina.linear</a>,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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">status getter/setter,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">speed</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-json-description">speed getter/setter,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">duration</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-json-description">duration getter/setter,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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">animation stopper</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">pause</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-json-description">pauses the animation</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">resume</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-json-description">resumes the animation</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">update</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-json-description">calles setter with the right value of the animation</span>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="mina.time">
|
||
<header>
|
||
<h3 class="dr-method">mina.time()<a href="#mina.time" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 208 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L208">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="mina.time-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns the current time. Equivalent to:
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">function () {
|
||
return (new Date).getTime();
|
||
}</code></pre></section>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="mina.getById">
|
||
<header>
|
||
<h3 class="dr-method">mina.getById(id)<a href="#mina.getById" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 217 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L217">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="mina.getById-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns an animation by its id
|
||
</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">id</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">animation's id</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">See <a href="#mina" class="dr-link">mina</a></span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="mina.linear">
|
||
<header>
|
||
<h3 class="dr-method">mina.linear(n)<a href="#mina.linear" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 229 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L229">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="mina.linear-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Default linear easing
|
||
</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">n</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">input 0..1</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">output 0..1</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="mina.easeout">
|
||
<header>
|
||
<h3 class="dr-method">mina.easeout(n)<a href="#mina.easeout" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 240 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L240">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="mina.easeout-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Easeout easing
|
||
</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">n</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">input 0..1</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">output 0..1</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="mina.easein">
|
||
<header>
|
||
<h3 class="dr-method">mina.easein(n)<a href="#mina.easein" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 251 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L251">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="mina.easein-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Easein easing
|
||
</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">n</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">input 0..1</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">output 0..1</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="mina.easeinout">
|
||
<header>
|
||
<h3 class="dr-method">mina.easeinout(n)<a href="#mina.easeinout" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 262 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L262">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="mina.easeinout-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Easeinout easing
|
||
</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">n</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">input 0..1</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">output 0..1</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="mina.backin">
|
||
<header>
|
||
<h3 class="dr-method">mina.backin(n)<a href="#mina.backin" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 286 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L286">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="mina.backin-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Backin easing
|
||
</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">n</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">input 0..1</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">output 0..1</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="mina.backout">
|
||
<header>
|
||
<h3 class="dr-method">mina.backout(n)<a href="#mina.backout" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 301 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L301">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="mina.backout-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Backout easing
|
||
</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">n</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">input 0..1</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">output 0..1</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="mina.elastic">
|
||
<header>
|
||
<h3 class="dr-method">mina.elastic(n)<a href="#mina.elastic" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 317 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L317">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="mina.elastic-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Elastic easing
|
||
</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">n</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">input 0..1</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">output 0..1</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="mina.bounce">
|
||
<header>
|
||
<h3 class="dr-method">mina.bounce(n)<a href="#mina.bounce" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 332 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L332">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="mina.bounce-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Bounce easing
|
||
</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">n</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">input 0..1</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">output 0..1</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Paper.filter">
|
||
<header>
|
||
<h3 class="dr-method">Paper.filter(filstr)<a href="#Paper.filter" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 37 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L37">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Paper.filter-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Creates a <code><filter></code> 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">filstr</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">SVG fragment of filter provided as a string</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>
|
||
|
||
|
||
|
||
|
||
|
||
<p>Note: It is recommended to use filters embedded into the page inside an empty SVG element.
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Usage</h3>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var f = paper.filter('<feGaussianBlur stdDeviation="2"/>'),
|
||
c = paper.circle(10, 10, 10).attr({
|
||
filter: f
|
||
});</code></pre></section>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.filter.blur">
|
||
<header>
|
||
<h3 class="dr-method">Snap.filter.blur(x, [y])<a href="#Snap.filter.blur" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 96 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L96">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.filter.blur-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns an SVG markup string for the blur filter
|
||
</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>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">amount of horizontal blur, in pixels</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">y</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">amount of vertical blur, in pixels</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">filter representation</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Usage</h3>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var f = paper.filter(Snap.filter.blur(5, 10)),
|
||
c = paper.circle(10, 10, 10).attr({
|
||
filter: f
|
||
});</code></pre></section>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.filter.shadow">
|
||
<header>
|
||
<h3 class="dr-method">Snap.filter.shadow(…)<a href="#Snap.filter.shadow" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 135 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L135">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.filter.shadow-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns an SVG markup string for the shadow filter
|
||
</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">dx</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">horizontal shift of the shadow, in pixels</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">dy</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">vertical shift of the shadow, in pixels</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">blur</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">amount of blur</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">color</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">color of the shadow</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">opacity</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description"><code>0..1</code> opacity of the shadow</span></li>
|
||
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p>or
|
||
</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">dx</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">horizontal shift of the shadow, in pixels</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">dy</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">vertical shift of the shadow, in pixels</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">color</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">color of the shadow</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">opacity</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description"><code>0..1</code> opacity of the shadow</span></li>
|
||
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p>which makes blur default to <code>4</code>. Or
|
||
</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">dx</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">horizontal shift of the shadow, in pixels</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">dy</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">vertical shift of the shadow, in pixels</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">opacity</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description"><code>0..1</code> opacity of the shadow</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">filter representation</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<h3>Usage</h3>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<section class="code"><pre class="javascript code"><code data-language="javascript" class="language-javascript">var f = paper.filter(Snap.filter.shadow(0, 2, 3)),
|
||
c = paper.circle(10, 10, 10).attr({
|
||
filter: f
|
||
});</code></pre></section>
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.filter.grayscale">
|
||
<header>
|
||
<h3 class="dr-method">Snap.filter.grayscale(amount)<a href="#Snap.filter.grayscale" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 180 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L180">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.filter.grayscale-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns an SVG markup string for the grayscale filter
|
||
</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">amount</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">amount of filter (<code>0..1</code>)</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">filter representation</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.filter.sepia">
|
||
<header>
|
||
<h3 class="dr-method">Snap.filter.sepia(amount)<a href="#Snap.filter.sepia" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 207 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L207">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.filter.sepia-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns an SVG markup string for the sepia filter
|
||
</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">amount</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">amount of filter (<code>0..1</code>)</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">filter representation</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.filter.saturate">
|
||
<header>
|
||
<h3 class="dr-method">Snap.filter.saturate(amount)<a href="#Snap.filter.saturate" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 235 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L235">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.filter.saturate-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns an SVG markup string for the saturate filter
|
||
</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">amount</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">amount of filter (<code>0..1</code>)</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">filter representation</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.filter.hueRotate">
|
||
<header>
|
||
<h3 class="dr-method">Snap.filter.hueRotate(angle)<a href="#Snap.filter.hueRotate" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 255 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L255">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.filter.hueRotate-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns an SVG markup string for the hue-rotate filter
|
||
</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">angle</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">angle of rotation</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">filter representation</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.filter.invert">
|
||
<header>
|
||
<h3 class="dr-method">Snap.filter.invert(amount)<a href="#Snap.filter.invert" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 273 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L273">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.filter.invert-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns an SVG markup string for the invert filter
|
||
</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">amount</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">amount of filter (<code>0..1</code>)</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">filter representation</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.filter.brightness">
|
||
<header>
|
||
<h3 class="dr-method">Snap.filter.brightness(amount)<a href="#Snap.filter.brightness" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 294 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L294">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.filter.brightness-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns an SVG markup string for the brightness filter
|
||
</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">amount</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">amount of filter (<code>0..1</code>)</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">filter representation</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.filter.contrast">
|
||
<header>
|
||
<h3 class="dr-method">Snap.filter.contrast(amount)<a href="#Snap.filter.contrast" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 314 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L314">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.filter.contrast-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns an SVG markup string for the contrast filter
|
||
</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">amount</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">amount of filter (<code>0..1</code>)</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">filter representation</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.click">
|
||
<header>
|
||
<h3 class="dr-method">Element.click(handler)<a href="#Element.click" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 165 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L165">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.click-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Adds a click event handler to 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.unclick">
|
||
<header>
|
||
<h3 class="dr-method">Element.unclick(handler)<a href="#Element.unclick" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 173 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L173">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.unclick-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes a click event handler from 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.dblclick">
|
||
<header>
|
||
<h3 class="dr-method">Element.dblclick(handler)<a href="#Element.dblclick" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 182 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L182">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.dblclick-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Adds a double click event handler to 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.undblclick">
|
||
<header>
|
||
<h3 class="dr-method">Element.undblclick(handler)<a href="#Element.undblclick" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 190 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L190">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.undblclick-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes a double click event handler from 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.mousedown">
|
||
<header>
|
||
<h3 class="dr-method">Element.mousedown(handler)<a href="#Element.mousedown" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 199 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L199">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.mousedown-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Adds a mousedown event handler to 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.unmousedown">
|
||
<header>
|
||
<h3 class="dr-method">Element.unmousedown(handler)<a href="#Element.unmousedown" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 207 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L207">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.unmousedown-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes a mousedown event handler from 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.mousemove">
|
||
<header>
|
||
<h3 class="dr-method">Element.mousemove(handler)<a href="#Element.mousemove" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 216 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L216">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.mousemove-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Adds a mousemove event handler to 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.unmousemove">
|
||
<header>
|
||
<h3 class="dr-method">Element.unmousemove(handler)<a href="#Element.unmousemove" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 224 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L224">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.unmousemove-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes a mousemove event handler from 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.mouseout">
|
||
<header>
|
||
<h3 class="dr-method">Element.mouseout(handler)<a href="#Element.mouseout" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 233 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L233">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.mouseout-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Adds a mouseout event handler to 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.unmouseout">
|
||
<header>
|
||
<h3 class="dr-method">Element.unmouseout(handler)<a href="#Element.unmouseout" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 241 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L241">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.unmouseout-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes a mouseout event handler from 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.mouseover">
|
||
<header>
|
||
<h3 class="dr-method">Element.mouseover(handler)<a href="#Element.mouseover" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 250 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L250">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.mouseover-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Adds a mouseover event handler to 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.unmouseover">
|
||
<header>
|
||
<h3 class="dr-method">Element.unmouseover(handler)<a href="#Element.unmouseover" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 258 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L258">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.unmouseover-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes a mouseover event handler from 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.mouseup">
|
||
<header>
|
||
<h3 class="dr-method">Element.mouseup(handler)<a href="#Element.mouseup" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 267 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L267">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.mouseup-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Adds a mouseup event handler to 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.unmouseup">
|
||
<header>
|
||
<h3 class="dr-method">Element.unmouseup(handler)<a href="#Element.unmouseup" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 275 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L275">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.unmouseup-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes a mouseup event handler from 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.touchstart">
|
||
<header>
|
||
<h3 class="dr-method">Element.touchstart(handler)<a href="#Element.touchstart" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 284 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L284">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.touchstart-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Adds a touchstart event handler to 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.untouchstart">
|
||
<header>
|
||
<h3 class="dr-method">Element.untouchstart(handler)<a href="#Element.untouchstart" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 292 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L292">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.untouchstart-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes a touchstart event handler from 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.touchmove">
|
||
<header>
|
||
<h3 class="dr-method">Element.touchmove(handler)<a href="#Element.touchmove" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 301 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L301">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.touchmove-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Adds a touchmove event handler to 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.untouchmove">
|
||
<header>
|
||
<h3 class="dr-method">Element.untouchmove(handler)<a href="#Element.untouchmove" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 309 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L309">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.untouchmove-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes a touchmove event handler from 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.touchend">
|
||
<header>
|
||
<h3 class="dr-method">Element.touchend(handler)<a href="#Element.touchend" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 318 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L318">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.touchend-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Adds a touchend event handler to 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.untouchend">
|
||
<header>
|
||
<h3 class="dr-method">Element.untouchend(handler)<a href="#Element.untouchend" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 326 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L326">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.untouchend-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes a touchend event handler from 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.touchcancel">
|
||
<header>
|
||
<h3 class="dr-method">Element.touchcancel(handler)<a href="#Element.touchcancel" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 335 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L335">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.touchcancel-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Adds a touchcancel event handler to 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.untouchcancel">
|
||
<header>
|
||
<h3 class="dr-method">Element.untouchcancel(handler)<a href="#Element.untouchcancel" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 343 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L343">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.untouchcancel-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes a touchcancel event handler from 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">handler</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<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.hover">
|
||
<header>
|
||
<h3 class="dr-method">Element.hover(f_in, f_out, [icontext], [ocontext])<a href="#Element.hover" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 382 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L382">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.hover-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Adds hover event handlers to 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">f_in</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">handler for hover in</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">f_out</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">handler for hover out</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">icontext</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-description">context for hover in handler</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">ocontext</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<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.unhover">
|
||
<header>
|
||
<h3 class="dr-method">Element.unhover(f_in, f_out)<a href="#Element.unhover" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 394 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L394">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.unhover-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes hover event handlers from 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">f_in</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">handler for hover in</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">f_out</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">handler for hover out</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.drag">
|
||
<header>
|
||
<h3 class="dr-method">Element.drag(onmove, onstart, onend, [mcontext], [scontext], [econtext])<a href="#Element.drag" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 432 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L432">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.drag-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Adds event handlers for an element's drag gesture
|
||
</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">onmove</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">handler for moving</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">onstart</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">handler for drag start</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">onend</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">handler for drag end</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">mcontext</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-description">context for moving handler</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">scontext</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-description">context for drag start handler</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">econtext</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-description">context for drag end handler</span></li>
|
||
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p>Additionaly following <code>drag</code> events are triggered: <code>drag.start.<id></code> on start,
|
||
<code>drag.end.<id></code> on end and <code>drag.move.<id></code> on every move. When element is dragged over another element
|
||
<code>drag.over.<id></code> fires as well.
|
||
</p><p>Start event and start handler are called in specified context or in context of the element with following parameters:
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x position of the mouse</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y position of the mouse</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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>
|
||
</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
|
||
<p>Move event and move handler are called in specified context or in context of the element with following parameters:
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">dx</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">shift by x from the start point</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">dy</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">shift by y from the start point</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x position of the mouse</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y position of the mouse</span>
|
||
</li>
|
||
|
||
|
||
|
||
<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>
|
||
</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
|
||
<p>End event and end handler are called in specified context or in context of the element with following parameters:
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<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>
|
||
</li>
|
||
|
||
|
||
</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.undrag">
|
||
<header>
|
||
<h3 class="dr-method">Element.undrag()<a href="#Element.undrag" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 476 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L476">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.undrag-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes all drag event handlers from the given element
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.path.getTotalLength">
|
||
<header>
|
||
<h3 class="dr-method">Snap.path.getTotalLength(path)<a href="#Snap.path.getTotalLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1143 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1143">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.path.getTotalLength-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns the length of the given path in pixels
|
||
</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">path</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">SVG path string</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">length</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.path.getPointAtLength">
|
||
<header>
|
||
<h3 class="dr-method">Snap.path.getPointAtLength(path, length)<a href="#Snap.path.getPointAtLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1160 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1160">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.path.getPointAtLength-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns the coordinates of the point located at the given length along the given path
|
||
</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">path</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">SVG path string</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">length</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">length, in pixels, from the start of the path, excluding non-rendering jumps</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">representation of the point:</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x coordinate,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y coordinate,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">alpha:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">angle of derivative</span>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.path.getSubpath">
|
||
<header>
|
||
<h3 class="dr-method">Snap.path.getSubpath(path, from, to)<a href="#Snap.path.getSubpath" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1173 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1173">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.path.getSubpath-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns the subpath of a given path between given start and end lengths
|
||
</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">path</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">SVG path string</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">from</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">length, in pixels, from the start of the path to the start of the segment</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">to</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">length, in pixels, from the start of the path to the end of the segment</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">path string definition for the segment</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.getTotalLength">
|
||
<header>
|
||
<h3 class="dr-method">Element.getTotalLength()<a href="#Element.getTotalLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1187 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1187">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.getTotalLength-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns the length of the path in pixels (only works for <code>path</code> elements)
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p class="dr-returns">
|
||
<strong class="dr-title">Returns:</strong>
|
||
|
||
<em class="dr-type-number">number</em>
|
||
|
||
<span class="dr-description">length</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.getPointAtLength">
|
||
<header>
|
||
<h3 class="dr-method">Element.getPointAtLength(length)<a href="#Element.getPointAtLength" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1208 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1208">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.getPointAtLength-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns coordinates of the point located at the given length on the given path (only works for <code>path</code> elements)
|
||
</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">length</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">length, in pixels, from the start of the path, excluding non-rendering jumps</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">representation of the point:</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x coordinate,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y coordinate,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">alpha:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">angle of derivative</span>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Element.getSubpath">
|
||
<header>
|
||
<h3 class="dr-method">Element.getSubpath(from, to)<a href="#Element.getSubpath" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1223 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1223">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Element.getSubpath-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Returns subpath of a given element from given start and end lengths (only works for <code>path</code> elements)
|
||
</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>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">length, in pixels, from the start of the path to the start of the segment</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">to</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">length, in pixels, from the start of the path to the end of the segment</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">path string definition for the segment</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.path.findDotsAtSegment">
|
||
<header>
|
||
<h3 class="dr-method">Snap.path.findDotsAtSegment(p1x, p1y, c1x, c1y, c2x, c2y, p2x, p2y, t)<a href="#Snap.path.findDotsAtSegment" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1266 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1266">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.path.findDotsAtSegment-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Utility method
|
||
Finds dot coordinates on the given cubic beziér curve at the given t
|
||
</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">p1x</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">x of the first point of the curve</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">p1y</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">y of the first point of the curve</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">c1x</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">x of the first anchor of the curve</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">c1y</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">y of the first anchor of the curve</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">c2x</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">x of the second anchor of the curve</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">c2y</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">y of the second anchor of the curve</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">p2x</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">x of the second point of the curve</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">p2y</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">y of the second point of the curve</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">t</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">position on the curve (0..1)</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">point information in format:</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x coordinate of the point,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y coordinate of the point,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li> m: {<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x coordinate of the left anchor,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y coordinate of the left anchor</span>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li> },</li>
|
||
|
||
|
||
|
||
<li> n: {<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x coordinate of the right anchor,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y coordinate of the right anchor</span>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li> },</li>
|
||
|
||
|
||
|
||
<li> start: {<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x coordinate of the start of the curve,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y coordinate of the start of the curve</span>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li> },</li>
|
||
|
||
|
||
|
||
<li> end: {<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x coordinate of the end of the curve,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y coordinate of the end of the curve</span>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li> },</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">alpha:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">angle of the curve derivative at the point</span>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.path.bezierBBox">
|
||
<header>
|
||
<h3 class="dr-method">Snap.path.bezierBBox(…)<a href="#Snap.path.bezierBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1294 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1294">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.path.bezierBBox-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Utility method
|
||
Returns the bounding box of a given cubic beziér curve
|
||
</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">p1x</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">x of the first point of the curve</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">p1y</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">y of the first point of the curve</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">c1x</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">x of the first anchor of the curve</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">c1y</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">y of the first anchor of the curve</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">c2x</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">x of the second anchor of the curve</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">c2y</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">y of the second anchor of the curve</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">p2x</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">x of the second point of the curve</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">p2y</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">y of the second point of the curve</span></li>
|
||
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p>or
|
||
</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">bez</span>
|
||
<span class="dr-type"><em class="dr-type-array">array</em> </span>
|
||
<span class="dr-description">array of six points for beziér curve</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">bounding box</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x coordinate of the left top point of the box,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y coordinate of the left top point of the box,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x2:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x coordinate of the right bottom point of the box,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y2:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y coordinate of the right bottom point of the box,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">width:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">width of the box,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">height:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">height of the box</span>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.path.isPointInsideBBox">
|
||
<header>
|
||
<h3 class="dr-method">Snap.path.isPointInsideBBox(bbox, x, y)<a href="#Snap.path.isPointInsideBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1307 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1307">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.path.isPointInsideBBox-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Utility method
|
||
Returns <code>true</code> if given point is inside bounding box
|
||
</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">bbox</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">bounding box</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">x</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">x coordinate of the point</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">y</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">y coordinate of the point</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 point is inside</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.path.isBBoxIntersect">
|
||
<header>
|
||
<h3 class="dr-method">Snap.path.isBBoxIntersect(bbox1, bbox2)<a href="#Snap.path.isBBoxIntersect" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1319 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1319">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.path.isBBoxIntersect-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Utility method
|
||
Returns <code>true</code> if two bounding boxes intersect
|
||
</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">bbox1</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">first bounding box</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">bbox2</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">second bounding box</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 bounding boxes intersect</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.path.intersection">
|
||
<header>
|
||
<h3 class="dr-method">Snap.path.intersection(path1, path2)<a href="#Snap.path.intersection" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1343 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1343">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.path.intersection-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Utility method
|
||
Finds intersections of two paths
|
||
</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">path1</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">path string</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">path2</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">path string</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">dots of intersection</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>[</li>
|
||
|
||
|
||
|
||
<li> {<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x coordinate of the point,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y coordinate of the point,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">t1:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">t value for segment of path1,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">t2:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">t value for segment of path2,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">segment1:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">order number for segment of path1,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">segment2:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">order number for segment of path2,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">bez1:</span>
|
||
<span class="dr-type"><em class="dr-type-array">array</em> </span>
|
||
<span class="dr-json-description">eight coordinates representing beziér curve for the segment of path1,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">bez2:</span>
|
||
<span class="dr-type"><em class="dr-type-array">array</em> </span>
|
||
<span class="dr-json-description">eight coordinates representing beziér curve for the segment of path2</span>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li> }</li>
|
||
|
||
|
||
|
||
<li>]</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.path.isPointInside">
|
||
<header>
|
||
<h3 class="dr-method">Snap.path.isPointInside(path, x, y)<a href="#Snap.path.isPointInside" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1359 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1359">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.path.isPointInside-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Utility method
|
||
Returns <code>true</code> if given point is inside a given closed path.
|
||
</p><p>Note: fill mode doesn’t affect the result of this method.
|
||
</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">path</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">path string</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">x</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">x of the point</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">y</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">y of the point</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 point is inside the path</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.path.getBBox">
|
||
<header>
|
||
<h3 class="dr-method">Snap.path.getBBox(path)<a href="#Snap.path.getBBox" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1378 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1378">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.path.getBBox-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Utility method
|
||
Returns the bounding box of a given path
|
||
</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">path</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">path string</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">bounding box</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<ol class="dr-json">
|
||
|
||
|
||
<li>{<ol class="dr-json">
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x coordinate of the left top point of the box,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y coordinate of the left top point of the box,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">x2:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">x coordinate of the right bottom point of the box,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">y2:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">y coordinate of the right bottom point of the box,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">width:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">width of the box,</span>
|
||
</li>
|
||
|
||
|
||
|
||
<li>
|
||
<span class="dr-json-key">height:</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-json-description">height of the box</span>
|
||
</li>
|
||
|
||
|
||
|
||
</ol></li><li>}</li>
|
||
|
||
|
||
</ol>
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.path.toRelative">
|
||
<header>
|
||
<h3 class="dr-method">Snap.path.toRelative(path)<a href="#Snap.path.toRelative" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1390 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1390">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.path.toRelative-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Utility method
|
||
Converts path coordinates into relative 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">path</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">path string</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">path string</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.path.toAbsolute">
|
||
<header>
|
||
<h3 class="dr-method">Snap.path.toAbsolute(path)<a href="#Snap.path.toAbsolute" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1401 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1401">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.path.toAbsolute-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Utility method
|
||
Converts path coordinates into absolute 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">path</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">path string</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">path string</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Snap.path.toCubic">
|
||
<header>
|
||
<h3 class="dr-method">Snap.path.toCubic(pathString)<a href="#Snap.path.toCubic" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1412 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1412">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.path.toCubic-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Utility method
|
||
Converts path to a new path where all segments are cubic beziér curves
|
||
</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">pathString</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> <em class="dr-type-array">array</em> </span>
|
||
<span class="dr-description">path string or array of segments</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.path.map">
|
||
<header>
|
||
<h3 class="dr-method">Snap.path.map(path, matrix)<a href="#Snap.path.map" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 1422 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L1422">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Snap.path.map-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Transform the path string with the given 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">path</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">path string</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">matrix</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-description">see <a href="#Matrix" class="dr-link">Matrix</a></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">transformed path string</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Set.push">
|
||
<header>
|
||
<h3 class="dr-method">Set.push()<a href="#Set.push" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 41 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L41">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Set.push-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Adds each argument to the current set
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p class="dr-returns">
|
||
<strong class="dr-title">Returns:</strong>
|
||
|
||
<em class="dr-type-object">object</em>
|
||
|
||
<span class="dr-description">original element</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Set.pop">
|
||
<header>
|
||
<h3 class="dr-method">Set.pop()<a href="#Set.pop" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 61 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L61">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Set.pop-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes last element and returns it
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p class="dr-returns">
|
||
<strong class="dr-title">Returns:</strong>
|
||
|
||
<em class="dr-type-object">object</em>
|
||
|
||
<span class="dr-description">element</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Set.forEach">
|
||
<header>
|
||
<h3 class="dr-method">Set.forEach(callback, thisArg)<a href="#Set.forEach" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 77 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L77">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Set.forEach-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Executes given function for each element in the set
|
||
</p><p>If the function returns <code>false</code>, the loop stops running.
|
||
</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">callback</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">function to run</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">thisArg</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-description">context object for the callback</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">Set object</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Set.bind">
|
||
<header>
|
||
<h3 class="dr-method">Set.bind(…)<a href="#Set.bind" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 162 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L162">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Set.bind-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Specifies how to handle a specific attribute when applied
|
||
to a set.
|
||
</p><p></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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">attribute name</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">callback</span>
|
||
<span class="dr-type"><em class="dr-type-function">function</em> </span>
|
||
<span class="dr-description">function to run</span></li>
|
||
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p>or
|
||
</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">attribute name</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">element</span>
|
||
<span class="dr-type"><em class="dr-type-Element">Element</em> </span>
|
||
<span class="dr-description">specific element in the set to apply the attribute to</span></li>
|
||
|
||
</ol>
|
||
</div>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
<p>or
|
||
</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>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">attribute name</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">element</span>
|
||
<span class="dr-type"><em class="dr-type-Element">Element</em> </span>
|
||
<span class="dr-description">specific element in the set to apply the attribute to</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">eattr</span>
|
||
<span class="dr-type"><em class="dr-type-string">string</em> </span>
|
||
<span class="dr-description">attribute on the element to bind the attribute to</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">Set object</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Set.clear">
|
||
<header>
|
||
<h3 class="dr-method">Set.clear()<a href="#Set.clear" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 195 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L195">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Set.clear-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes all elements from the set
|
||
</p>
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Set.splice">
|
||
<header>
|
||
<h3 class="dr-method">Set.splice(index, count, [insertion…])<a href="#Set.splice" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 211 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L211">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Set.splice-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes range of elements from the set
|
||
</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">index</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">position of the deletion</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">count</span>
|
||
<span class="dr-type"><em class="dr-type-number">number</em> </span>
|
||
<span class="dr-description">number of element to remove</span></li>
|
||
<li class="topcoat-list__item"><span class="dr-param">insertion…</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-description">elements to insert</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">set elements that were deleted</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
<article id="Set.exclude">
|
||
<header>
|
||
<h3 class="dr-method">Set.exclude(element)<a href="#Set.exclude" title="Link to this section" class="dr-hash">⚓</a><a class="dr-sourceline" title="Go to line 246 in the source" href="https://github.com/adobe-webplatform/Snap.svg/blob/master/src/svg.js#L246">➭</a></h3>
|
||
</header>
|
||
<section>
|
||
<div class="extra" id="Set.exclude-extra"></div>
|
||
<div class="dr-method">
|
||
|
||
|
||
|
||
|
||
<p>Removes given element from the set
|
||
</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">element</span>
|
||
<span class="dr-type"><em class="dr-type-object">object</em> </span>
|
||
<span class="dr-description">element to remove</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 object was found and removed from the set</span>
|
||
</p>
|
||
|
||
|
||
|
||
|
||
</div>
|
||
</section>
|
||
</article>
|
||
|
||
</div>
|
||
<footer></footer>
|
||
</div>
|
||
</div>
|
||
<!-- <script src="//use.edgefonts.net/source-sans-pro:n3,n4,n6;source-code-pro:n3.js"></script> -->
|
||
<script src="/assets/docs/js/prism.js"></script>
|
||
<script>!function(e){if(e){for(var t=function(e,t){var n=t.toUpperCase().split(""),r=n.shift(),a=RegExp("^["+r.toLowerCase()+r+"][a-z]*"+n.join("[a-z]*")+"[a-z]*$")
|
||
return!!(e+"").match(a)},n=function(e,n){e+="",n+=""
|
||
var r,a=0
|
||
if(e==n)return 1
|
||
if(!e||!n)return 0
|
||
if(t(e,n))return.9
|
||
a=0,r=e.toLowerCase()
|
||
for(var i,o=0,l=n.length;l>o;o++)i=r.indexOf(n.charAt(o)),~i&&(r=r.substring(i+1),a+=1/(i+1))
|
||
return a=Math.max(a/l-Math.abs(e.length-l)/e.length/2,0)},r=e.getElementsByTagName("span"),a=[],i=/[^\.\(]*(?=(\(\))?$)/,o=0,l=r.length;l>o;o++)a[o]={li:r[o].parentNode.parentNode,text:r[o].innerHTML.match(i)[0]}
|
||
var h=document.getElementById("dr-filter"),f=function(e,t){return t.weight-e.weight}
|
||
h.onclick=h.onchange=h.onkeydown=h.onkeyup=function(){var t=h.value,r=[]
|
||
if(t.length>1){for(var i=0,o=a.length;o>i;i++)r[i]={li:a[i].li,weight:n(a[i].text,t)}
|
||
r.sort(f)}else r=a
|
||
for(i=0,o=r.length;o>i;i++)e.appendChild(r[i].li)}}}(document.getElementById("dr-toc"))</script>
|
||
</body></html> |