diff options
author | wout <wout@impinc.co.uk> | 2013-02-02 17:20:06 +0100 |
---|---|---|
committer | wout <wout@impinc.co.uk> | 2013-02-02 17:20:06 +0100 |
commit | 1c9b6af19cd1367a74b91cb88e98ec1bef2d8234 (patch) | |
tree | a64ed5b3858018bb2cb4bab85f7fffb0c54c7f2e /src | |
parent | 7323d05f9d09141ec81dcd78d09bdba714c1c5dd (diff) | |
download | svg.js-1c9b6af19cd1367a74b91cb88e98ec1bef2d8234.tar.gz svg.js-1c9b6af19cd1367a74b91cb88e98ec1bef2d8234.zip |
Updated opacity() method in sugar module
Diffstat (limited to 'src')
-rw-r--r-- | src/sugar.js | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/src/sugar.js b/src/sugar.js index d53054e..b0c409c 100644 --- a/src/sugar.js +++ b/src/sugar.js @@ -54,19 +54,7 @@ var _colorPrefix = function(type, attr) { }, // Opacity opacity: function(value) { - if (['rect', 'ellipse', 'polygon', 'path', 'polyline', 'line', 'text'].indexOf(this.type) > -1) { - if (value == null) - return this.attr('fill-opacity'); - else - this.attr({ 'fill-opacity': value, 'stroke-opacity': value }); - } else { - if (value == null) - return this.attr('opacity'); - else - this.attr('opacity', value); - } - - return this; + return this.attr('opacity', value); } }); |