From: Rob Walch Date: Mon, 8 Apr 2013 17:15:49 +0000 (-0300) Subject: Fixed plot poly with array of points X-Git-Tag: 0.13~6^2 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=4ff77fb57280aa8855e63fcbb1596587a260868b;p=svg.js.git Fixed plot poly with array of points --- 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 +})