summaryrefslogtreecommitdiffstats
path: root/src/sugar.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/sugar.js
parentdf8db4b03df6740e47851907a4b901362634c50b (diff)
downloadsvg.js-b27d01e9f91bff6145170ebd46857cd703480fec.tar.gz
svg.js-b27d01e9f91bff6145170ebd46857cd703480fec.zip
Bumped to v0.33
Diffstat (limited to 'src/sugar.js')
-rwxr-xr-x[-rw-r--r--]src/sugar.js9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/sugar.js b/src/sugar.js
index 9577d94..5d7f5aa 100644..100755
--- a/src/sugar.js
+++ b/src/sugar.js
@@ -72,6 +72,15 @@ SVG.extend(SVG.Element, SVG.FX, {
})
+//
+SVG.extend(SVG.Rect, SVG.Ellipse, {
+ // Add x and y radius
+ radius: function(x, y) {
+ return this.attr({ rx: x, ry: y || x })
+ }
+
+})
+
if (SVG.Text) {
SVG.extend(SVG.Text, SVG.FX, {