From 8f03d84e43681ecca20ac028071e51a2e2bbc0c8 Mon Sep 17 00:00:00 2001 From: wout Date: Sun, 9 Jun 2013 11:37:26 +0100 Subject: Added deep traversing, reorganizd modules --- src/rect.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'src/rect.js') diff --git a/src/rect.js b/src/rect.js index 1a3bf19..583556d 100644 --- a/src/rect.js +++ b/src/rect.js @@ -3,4 +3,13 @@ SVG.Rect = function() { } // Inherit from SVG.Shape -SVG.Rect.prototype = new SVG.Shape \ No newline at end of file +SVG.Rect.prototype = new SVG.Shape + +// +SVG.extend(SVG.Container, { + // Create a rect element + rect: function(width, height) { + return this.put(new SVG.Rect().size(width, height)) + } + +}) \ No newline at end of file -- cgit v1.2.3