diff options
author | wout <wout@impinc.co.uk> | 2012-12-18 19:54:12 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2012-12-18 19:54:12 +0100 |
commit | 1293edb66a5263f8f7064f16f11cbf6b8f550800 (patch) | |
tree | a336fb50db98d52ec8151b494bfa7762128c170e /src/ellipse.js | |
parent | ecc7c2b21cc484a0a57cd7df02a533c65f7bde97 (diff) | |
download | svg.js-1293edb66a5263f8f7064f16f11cbf6b8f550800.tar.gz svg.js-1293edb66a5263f8f7064f16f11cbf6b8f550800.zip |
Separated core from optional libraries
Diffstat (limited to 'src/ellipse.js')
-rw-r--r-- | src/ellipse.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ellipse.js b/src/ellipse.js index f1638ee..adc1fd6 100644 --- a/src/ellipse.js +++ b/src/ellipse.js @@ -26,10 +26,11 @@ SVG.extend(SVG.Ellipse, { return this; }, - - center: function(cx, cy) { - this.attr('cx', cx || ((this.attrs.x || 0) + (this.attrs.rx || 0))); - this.attr('cy', cy || ((this.attrs.y || 0) + (this.attrs.ry || 0))); + + // position element by its center + center: function(x, y) { + this.attr('cx', x || ((this.attrs.x || 0) + (this.attrs.rx || 0))); + this.attr('cy', y || ((this.attrs.y || 0) + (this.attrs.ry || 0))); } }); |