diff options
Diffstat (limited to 'src/defs.js')
-rw-r--r-- | src/defs.js | 24 |
1 files changed, 15 insertions, 9 deletions
diff --git a/src/defs.js b/src/defs.js index 4661a54..4c252a5 100644 --- a/src/defs.js +++ b/src/defs.js @@ -1,17 +1,23 @@ + SVG.Defs = function Defs() { - this.constructor.call(this, SVG.createElement('defs')); + this.constructor.call(this, SVG.create('defs')); }; // inherit from SVG.Element SVG.Defs.prototype = new SVG.Element(); -// define clippath -SVG.Defs.prototype.clipPath = function() { - var e = new SVG.ClipPath(); - this.add(e); +// include the container object +SVG.Utils.merge(SVG.Defs, SVG.Container); + +// Add def-specific functions +SVG.Utils.merge(SVG.Defs, { - return e; -}; + // define clippath + clipPath: function() { + var e = new SVG.ClipPath(); + this.add(e); -// include the container object -SVG.Defs.include(SVG.Container);
\ No newline at end of file + return e; + } + +});
\ No newline at end of file |