aboutsummaryrefslogtreecommitdiffstats
path: root/src/poly.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/poly.js')
-rw-r--r--src/poly.js14
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