diff options
author | wout <wout@impinc.co.uk> | 2013-02-20 19:10:03 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-02-20 19:10:03 +0100 |
commit | ae878fd63077d4c95f2de9053a6f0951b55239eb (patch) | |
tree | 5dba7bd42a8b5702faeb6cc12d2b4d4099841e51 /src/mask.js | |
parent | 5020240e4029a61a9620f21d7be4d9764e7723d1 (diff) | |
download | svg.js-ae878fd63077d4c95f2de9053a6f0951b55239eb.tar.gz svg.js-ae878fd63077d4c95f2de9053a6f0951b55239eb.zip |
Created separate classes for SVG.ViewBox anSVG.BBox0.6
Diffstat (limited to 'src/mask.js')
-rw-r--r-- | src/mask.js | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/mask.js b/src/mask.js index c33b93a..708b982 100644 --- a/src/mask.js +++ b/src/mask.js @@ -1,21 +1,21 @@ -SVG.Mask = function Mask() { - this.constructor.call(this, SVG.create('mask')); +SVG.Mask = function() { + this.constructor.call(this, SVG.create('mask')) /* set unique id */ - this.attr('id', (this.id = 'svgjs_element_' + (SVG.did++))); -}; + this.attr('id', (this.id = 'svgjs_element_' + (SVG.did++))) +} // Inherit from SVG.Container -SVG.Mask.prototype = new SVG.Container(); +SVG.Mask.prototype = new SVG.Container SVG.extend(SVG.Element, { // Distribute mask to svg element maskWith: function(element) { /* use given mask or create a new one */ - this.mask = element instanceof SVG.Mask ? element : this.parent.mask().add(element); + this.mask = element instanceof SVG.Mask ? element : this.parent.mask().add(element) - return this.attr('mask', 'url(#' + this.mask.id + ')'); + return this.attr('mask', 'url(#' + this.mask.id + ')') } -});
\ No newline at end of file +})
\ No newline at end of file |