diff options
Diffstat (limited to 'src/poly.js')
-rw-r--r-- | src/poly.js | 23 |
1 files changed, 10 insertions, 13 deletions
diff --git a/src/poly.js b/src/poly.js index e504b4c..8867604 100644 --- a/src/poly.js +++ b/src/poly.js @@ -1,37 +1,34 @@ - SVG.Poly = { - // set polygon data with default zero point if no data is passed - plot: function(p) { - return this.attr('points', p || '0,0'); + // Set polygon data with default zero point if no data is passed + plot: function(points) { + return this.attr('points', points || '0,0'); }, - - // move path using translate + // Move path using translate move: function(x, y) { - return this.transform({ x: x, y: y }); + return this.transform({ + x: x, + y: y + }); } }; - - SVG.Polyline = function Polyline() { this.constructor.call(this, SVG.create('polyline')); }; -// inherit from SVG.Shape +// Inherit from SVG.Shape SVG.Polyline.prototype = new SVG.Shape(); // Add polygon-specific functions SVG.extend(SVG.Polyline, SVG.Poly); - - SVG.Polygon = function Polygon() { this.constructor.call(this, SVG.create('polygon')); }; -// inherit from SVG.Shape +// Inherit from SVG.Shape SVG.Polygon.prototype = new SVG.Shape(); // Add polygon-specific functions |