From 1c9b6af19cd1367a74b91cb88e98ec1bef2d8234 Mon Sep 17 00:00:00 2001 From: wout Date: Sat, 2 Feb 2013 17:20:06 +0100 Subject: Updated opacity() method in sugar module --- src/sugar.js | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'src') 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); } }); -- cgit v1.2.3