summaryrefslogtreecommitdiffstats
path: root/src/sugar.js
diff options
context:
space:
mode:
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, {