Tile opacity patch from tschaub: Fix for #235. Also includes tests to ensure
that code works. git-svn-id: http://svn.openlayers.org/trunk/openlayers@1433 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -125,6 +125,19 @@ OpenLayers.Util.createImage = function(id, px, sz, imgURL, position, border,
|
||||
return image;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the opacity of a DOM Element
|
||||
* Note that for this function to work in IE, elements must "have layout"
|
||||
* according to:
|
||||
* http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/haslayout.asp
|
||||
*
|
||||
* @param {DOMElement} element Set the opacity on this DOM element
|
||||
* @param {Float} opacity Opacity value (0.0 - 1.0)
|
||||
*/
|
||||
OpenLayers.Util.setOpacity = function(element, opacity) {
|
||||
element.style.opacity = opacity;
|
||||
element.style.filter = 'alpha(opacity=' + (opacity * 100) + ')';
|
||||
}
|
||||
|
||||
OpenLayers.Util.onImageLoad = function() {
|
||||
this.style.backgroundColor = null;
|
||||
|
||||
Reference in New Issue
Block a user