diff options
author | wout <wout@impinc.co.uk> | 2013-06-09 11:37:26 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-06-09 11:37:26 +0100 |
commit | 8f03d84e43681ecca20ac028071e51a2e2bbc0c8 (patch) | |
tree | f5c11dc6c429e8459c20731ba775fa6ca794400f /src/ellipse.js | |
parent | ec75128ec31aa055aca2ae7f95ad4f5cf38d12e0 (diff) | |
download | svg.js-8f03d84e43681ecca20ac028071e51a2e2bbc0c8.tar.gz svg.js-8f03d84e43681ecca20ac028071e51a2e2bbc0c8.zip |
Added deep traversing, reorganizd modules
Diffstat (limited to 'src/ellipse.js')
-rw-r--r-- | src/ellipse.js | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/ellipse.js b/src/ellipse.js index 598c250..2ff0c86 100644 --- a/src/ellipse.js +++ b/src/ellipse.js @@ -34,6 +34,19 @@ SVG.extend(SVG.Ellipse, { }) +// +SVG.extend(SVG.Container, { + // Create circle element, based on ellipse + circle: function(size) { + return this.ellipse(size, size) + } + // Create an ellipse +, ellipse: function(width, height) { + return this.put(new SVG.Ellipse().size(width, height).move(0, 0)) + } + +}) + // Usage: // draw.ellipse(200, 100)
\ No newline at end of file |