summaryrefslogtreecommitdiffstats
path: root/src/ellipse.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2013-03-24 19:19:06 +0100
committerwout <wout@impinc.co.uk>2013-03-24 19:19:06 +0100
commit67d367e0d74b3287956130da0077e42c6483dd2f (patch)
treebb2d23315e39c89b79cb8c52e7a5db54636e08ad /src/ellipse.js
parentff09596144c3fd6770d1dc64178a10c2432396ca (diff)
downloadsvg.js-67d367e0d74b3287956130da0077e42c6483dd2f.tar.gz
svg.js-67d367e0d74b3287956130da0077e42c6483dd2f.zip
Bumped to v0.11
- removed SVG.Wrap on SVG.Polyline, SVG.Polygon and SVG.Path - added delay on SVG.FX module - made x(), y(), cx() and cy() as getters - added SGB.get() method, to get elements by a DOM id - fixed bug in remove() method on container elements - added jasmine test suite to repo
Diffstat (limited to 'src/ellipse.js')
-rw-r--r--src/ellipse.js8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ellipse.js b/src/ellipse.js
index 1f9ef41..598c250 100644
--- a/src/ellipse.js
+++ b/src/ellipse.js
@@ -10,19 +10,19 @@ SVG.Ellipse.prototype = new SVG.Shape
SVG.extend(SVG.Ellipse, {
// Move over x-axis
x: function(x) {
- return this.cx(x + this.attrs.rx)
+ return x == null ? this.cx() - this.attr('rx') : this.cx(x + this.attr('rx'))
}
// Move over y-axis
, y: function(y) {
- return this.cy(y + this.attrs.ry)
+ return y == null ? this.cy() - this.attr('ry') : this.cy(y + this.attr('ry'))
}
// Move by center over x-axis
, cx: function(x) {
- return this.attr('cx', x)
+ return x == null ? this.attr('cx') : this.attr('cx', x / this.trans.scaleX)
}
// Move by center over y-axis
, cy: function(y) {
- return this.attr('cy', y)
+ return y == null ? this.attr('cy') : this.attr('cy', y / this.trans.scaleY)
}
// Custom size function
, size: function(width, height) {