Set the opacity directly to element.style.opacity

goog.style.setOpacity handles the IE8 case (but we are doing the same
above in the same function) and Firefox prior to version 3.5 (latest
stable release in April 2011).

See https://developer.mozilla.org/en-US/docs/Web/CSS/opacity
This commit is contained in:
Frederic Junod
2014-09-15 15:55:00 +02:00
parent 8bf43f5f22
commit ec9386acfe

View File

@@ -6,7 +6,6 @@ goog.provide('ol.dom.BrowserFeature');
goog.require('goog.asserts');
goog.require('goog.dom');
goog.require('goog.dom.TagName');
goog.require('goog.style');
goog.require('goog.userAgent');
goog.require('goog.vec.Mat4');
goog.require('ol');
@@ -180,7 +179,7 @@ ol.dom.setOpacity = function(element, value) {
element.style.zIndex = 0;
}
} else {
goog.style.setOpacity(element, value);
element.style.opacity = value;
}
};