aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWout Fierens <wout@impinc.co.uk>2013-04-08 10:25:40 -0700
committerWout Fierens <wout@impinc.co.uk>2013-04-08 10:25:40 -0700
commit6117eb4cdf07a687f663ef7cddd67223a947c9d5 (patch)
treeea5aaafa64033aaad95414473556452c6d139f13
parentdfebeb0f3abca8218b0a0e62cab7260a4715b828 (diff)
parent4ff77fb57280aa8855e63fcbb1596587a260868b (diff)
downloadsvg.js-6117eb4cdf07a687f663ef7cddd67223a947c9d5.tar.gz
svg.js-6117eb4cdf07a687f663ef7cddd67223a947c9d5.zip
Merge pull request #20 from robwalch/patch-1
Fixed plot poly with array of points
-rw-r--r--src/poly.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/poly.js b/src/poly.js
index 5c458f0..36492dc 100644
--- a/src/poly.js
+++ b/src/poly.js
@@ -26,10 +26,10 @@ SVG.extend(SVG.Polyline, SVG.Polygon, {
for (i = 0, l = p.length; i < l; i++)
points.push(p[i].join(','))
- p = points.length == 0 ? points.join(' ') : '0,0'
+ p = points.length > 0 ? points.join(' ') : '0,0'
}
return this.attr('points', p || '0,0')
}
-}) \ No newline at end of file
+})