diff options
author | wout <wout@impinc.co.uk> | 2013-06-09 11:37:26 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-06-09 11:37:26 +0100 |
commit | 8f03d84e43681ecca20ac028071e51a2e2bbc0c8 (patch) | |
tree | f5c11dc6c429e8459c20731ba775fa6ca794400f /src/poly.js | |
parent | ec75128ec31aa055aca2ae7f95ad4f5cf38d12e0 (diff) | |
download | svg.js-8f03d84e43681ecca20ac028071e51a2e2bbc0c8.tar.gz svg.js-8f03d84e43681ecca20ac028071e51a2e2bbc0c8.zip |
Added deep traversing, reorganizd modules
Diffstat (limited to 'src/poly.js')
-rw-r--r-- | src/poly.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/poly.js b/src/poly.js index 36492dc..8dd4696 100644 --- a/src/poly.js +++ b/src/poly.js @@ -32,4 +32,16 @@ SVG.extend(SVG.Polyline, SVG.Polygon, { return this.attr('points', p || '0,0') } -}) +}) + +// +SVG.extend(SVG.Container, { + // Create a wrapped polyline element + polyline: function(points, unbiased) { + return this.put(new SVG.Polyline(unbiased)).plot(points) + } + // Create a wrapped polygon element +, polygon: function(points, unbiased) { + return this.put(new SVG.Polygon(unbiased)).plot(points) + } +})
\ No newline at end of file |