From 7323d05f9d09141ec81dcd78d09bdba714c1c5dd Mon Sep 17 00:00:00 2001 From: wout Date: Sat, 2 Feb 2013 11:14:21 +0100 Subject: Reworked SVG.Container inheritance --- src/container.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'src/container.js') 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 -- cgit v1.2.3