diff options
Diffstat (limited to 'src/poly.js')
-rw-r--r-- | src/poly.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/poly.js b/src/poly.js index af1f075..269b112 100644 --- a/src/poly.js +++ b/src/poly.js @@ -42,7 +42,12 @@ SVG.extend(SVG.Polyline, SVG.Polygon, { , plot: function(p) { return (p == null) ? this.array() : - this.attr('points', (this._array = new SVG.PointArray(p))) + this.clear().attr('points', typeof p == 'string' ? p : (this._array = new SVG.PointArray(p))) + } + // Clear array cache +, clear: function() { + delete this._array + return this } // Move by left top corner , move: function(x, y) { |