diff options
author | wout <wout@impinc.co.uk> | 2014-02-03 15:14:47 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2014-02-03 15:14:47 +0100 |
commit | e2304534e0cfb6f6f4ab8c37ea5275ae26cd455a (patch) | |
tree | 2386e9f361d9c5fa1308387aeeaf33f00241b3c5 /src/nested.js | |
parent | 7a29817ffd764cf7ab6906250b57f234801c94e0 (diff) | |
download | svg.js-e2304534e0cfb6f6f4ab8c37ea5275ae26cd455a.tar.gz svg.js-e2304534e0cfb6f6f4ab8c37ea5275ae26cd455a.zip |
Implemented SVG.invent function and bumped to v1.0rc3
Diffstat (limited to 'src/nested.js')
-rwxr-xr-x | src/nested.js | 28 |
1 files changed, 15 insertions, 13 deletions
diff --git a/src/nested.js b/src/nested.js index d42abf9..cd3a0e0 100755 --- a/src/nested.js +++ b/src/nested.js @@ -1,17 +1,19 @@ -SVG.Nested = function() { - this.constructor.call(this, SVG.create('svg')) - - this.style('overflow', 'visible') -} - -// Inherit from SVG.Container -SVG.Nested.prototype = new SVG.Container +SVG.Nested = SVG.invent({ + // Initialize node + create: function() { + this.constructor.call(this, SVG.create('svg')) + + this.style('overflow', 'visible') + } -// -SVG.extend(SVG.Container, { - // Create nested svg document + // Inherit from +, inherit: SVG.Container + + // Add parent method +, construct: { + // Create nested svg document nested: function() { - return this.put(new SVG.Nested) + return this.put(new SVG.Nested) + } } - })
\ No newline at end of file |