diff options
author | wout <wout@impinc.co.uk> | 2013-02-20 19:10:03 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-02-20 19:10:03 +0100 |
commit | ae878fd63077d4c95f2de9053a6f0951b55239eb (patch) | |
tree | 5dba7bd42a8b5702faeb6cc12d2b4d4099841e51 /src/poly.js | |
parent | 5020240e4029a61a9620f21d7be4d9764e7723d1 (diff) | |
download | svg.js-ae878fd63077d4c95f2de9053a6f0951b55239eb.tar.gz svg.js-ae878fd63077d4c95f2de9053a6f0951b55239eb.zip |
Created separate classes for SVG.ViewBox anSVG.BBox0.6
Diffstat (limited to 'src/poly.js')
-rw-r--r-- | src/poly.js | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/src/poly.js b/src/poly.js index 395b0bf..9e89570 100644 --- a/src/poly.js +++ b/src/poly.js @@ -1,28 +1,28 @@ SVG.Poly = { // Set polygon data with default zero point if no data is passed plot: function(points) { - this.attr('points', points || '0,0'); + this.attr('points', points || '0,0') - return this; + return this } -}; +} -SVG.Polyline = function Polyline() { - this.constructor.call(this, SVG.create('polyline')); -}; +SVG.Polyline = function() { + this.constructor.call(this, SVG.create('polyline')) +} // Inherit from SVG.Shape -SVG.Polyline.prototype = new SVG.Shape(); +SVG.Polyline.prototype = new SVG.Shape() // Add polygon-specific functions -SVG.extend(SVG.Polyline, SVG.Poly); +SVG.extend(SVG.Polyline, SVG.Poly) -SVG.Polygon = function Polygon() { - this.constructor.call(this, SVG.create('polygon')); -}; +SVG.Polygon = function() { + this.constructor.call(this, SVG.create('polygon')) +} // Inherit from SVG.Shape -SVG.Polygon.prototype = new SVG.Shape(); +SVG.Polygon.prototype = new SVG.Shape() // Add polygon-specific functions -SVG.extend(SVG.Polygon, SVG.Poly);
\ No newline at end of file +SVG.extend(SVG.Polygon, SVG.Poly)
\ No newline at end of file |