aboutsummaryrefslogtreecommitdiffstats
path: root/src/ellipse.js
diff options
context:
space:
mode:
authorwout <wout@impinc.co.uk>2014-01-22 12:48:49 +0100
committerwout <wout@impinc.co.uk>2014-01-22 12:48:49 +0100
commitb27d01e9f91bff6145170ebd46857cd703480fec (patch)
treeaca9a0b30423ec4f7db769969ae5f3b25c7893df /src/ellipse.js
parentdf8db4b03df6740e47851907a4b901362634c50b (diff)
downloadsvg.js-b27d01e9f91bff6145170ebd46857cd703480fec.tar.gz
svg.js-b27d01e9f91bff6145170ebd46857cd703480fec.zip
Bumped to v0.33
Diffstat (limited to 'src/ellipse.js')
-rwxr-xr-x[-rw-r--r--]src/ellipse.js8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/ellipse.js b/src/ellipse.js
index ea019e0..86186c9 100644..100755
--- a/src/ellipse.js
+++ b/src/ellipse.js
@@ -24,6 +24,14 @@ SVG.extend(SVG.Ellipse, {
, cy: function(y) {
return y == null ? this.attr('cy') : this.attr('cy', new SVG.Number(y).divide(this.trans.scaleY))
}
+ // Set width of element
+, width: function(width) {
+ return width == null ? this.attr('rx') * 2 : this.attr('rx', new SVG.Number(width).divide(2))
+ }
+ // Set height of element
+, height: function(height) {
+ return height == null ? this.attr('ry') * 2 : this.attr('ry', new SVG.Number(height).divide(2))
+ }
// Custom size function
, size: function(width, height) {
return this.attr({