diff options
author | wout <wout@impinc.co.uk> | 2012-12-29 15:20:50 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2012-12-29 15:20:50 +0100 |
commit | 331068a979be8b735e92f074ce0d2438f5f2127b (patch) | |
tree | 25983c08fc3c28ab7bdf5c394a4800b3b095d092 /src/circle.js | |
parent | a20c0b1430fb97ff203a9afd6ba6945cf18e58d1 (diff) | |
download | svg.js-331068a979be8b735e92f074ce0d2438f5f2127b.tar.gz svg.js-331068a979be8b735e92f074ce0d2438f5f2127b.zip |
Added polyline and polygon, removed cicle
Diffstat (limited to 'src/circle.js')
-rw-r--r-- | src/circle.js | 35 |
1 files changed, 0 insertions, 35 deletions
diff --git a/src/circle.js b/src/circle.js deleted file mode 100644 index 059813e..0000000 --- a/src/circle.js +++ /dev/null @@ -1,35 +0,0 @@ - -SVG.Circle = function Circle() { - this.constructor.call(this, SVG.create('circle')); -}; - -// inherit from SVG.Shape -SVG.Circle.prototype = new SVG.Shape(); - -// Add circle-specific functions -SVG.extend(SVG.Circle, { - - // custom move function - move: function(x, y) { - this.attrs.x = x; - this.attrs.y = y; - - return this.center(); - }, - - // custom size function (no height value here!) - size: function(w) { - return this.attr('r', w / 2).center(); - }, - - // position element by its center - center: function(x, y) { - var r = this.attrs.r || 0; - - return this.attr({ - cx: x || (this.attrs.x || 0) + r, - cy: y || (this.attrs.y || 0) + r - }); - } - -});
\ No newline at end of file |