diff options
author | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-11-06 22:28:20 +0100 |
---|---|---|
committer | Ulrich-Matthias Schäfer <ulima.ums@googlemail.com> | 2015-11-06 22:28:20 +0100 |
commit | 3cb00000586340276998144d202d7af35c47ae36 (patch) | |
tree | 6b431cf16f05efeef63e145d1d1dc6aaceede4fb /src/mask.js | |
parent | 2702ceb26d3021720f3ff979bcf5f46fc65699e9 (diff) | |
download | svg.js-3cb00000586340276998144d202d7af35c47ae36.tar.gz svg.js-3cb00000586340276998144d202d7af35c47ae36.zip |
tab to space, block comments to line comments
Diffstat (limited to 'src/mask.js')
-rw-r--r-- | src/mask.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/mask.js b/src/mask.js index 73f29c2..197fd06 100644 --- a/src/mask.js +++ b/src/mask.js @@ -3,7 +3,7 @@ SVG.Mask = SVG.invent({ create: function() { this.constructor.call(this, SVG.create('mask')) - /* keep references to masked elements */ + // keep references to masked elements this.targets = [] } @@ -14,13 +14,13 @@ SVG.Mask = SVG.invent({ , extend: { // Unmask all masked elements and remove itself remove: function() { - /* unmask all targets */ + // unmask all targets for (var i = this.targets.length - 1; i >= 0; i--) if (this.targets[i]) this.targets[i].unmask() delete this.targets - /* remove mask from parent */ + // remove mask from parent this.parent().removeElement(this) return this @@ -40,13 +40,13 @@ SVG.Mask = SVG.invent({ SVG.extend(SVG.Element, { // Distribute mask to svg element maskWith: function(element) { - /* use given mask or create a new one */ + // use given mask or create a new one this.masker = element instanceof SVG.Mask ? element : this.parent().mask().add(element) - /* store reverence on self in mask */ + // store reverence on self in mask this.masker.targets.push(this) - /* apply mask */ + // apply mask return this.attr('mask', 'url("#' + this.masker.attr('id') + '")') } // Unmask element |