diff options
author | wout <wout@impinc.co.uk> | 2013-02-02 11:14:21 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-02-02 11:14:21 +0100 |
commit | 7323d05f9d09141ec81dcd78d09bdba714c1c5dd (patch) | |
tree | 191d1a1e74f8f6b2ab5b7e473897e5daf8759dde /src/container.js | |
parent | 4a7588695a1b385f41acd6cbbfaf76b38b2a1439 (diff) | |
download | svg.js-7323d05f9d09141ec81dcd78d09bdba714c1c5dd.tar.gz svg.js-7323d05f9d09141ec81dcd78d09bdba714c1c5dd.zip |
Reworked SVG.Container inheritance
Diffstat (limited to 'src/container.js')
-rw-r--r-- | src/container.js | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/container.js b/src/container.js index d828371..1f0998a 100644 --- a/src/container.js +++ b/src/container.js @@ -1,7 +1,12 @@ -// ### A module used for container elements like SVG.Doc, SVG.Group, SVG.Defs, ... +SVG.Container = function Container(element) { + this.constructor.call(this, element); +}; + +// Inherit from SVG.Element +SVG.Container.prototype = new SVG.Element(); // -SVG.Container = { +SVG.extend(SVG.Container, { // Add given element at a position add: function(element, index) { if (!this.has(element)) { @@ -131,4 +136,4 @@ SVG.Container = { return this; } -};
\ No newline at end of file +});
\ No newline at end of file |