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:
@@ -435,6 +435,18 @@ OpenLayers.Layer.prototype = {
|
||||
Math.round(1/resolution * (extent.top - lonlat.lat))
|
||||
);
|
||||
},
|
||||
|
||||
/**
|
||||
* Sets the opacity for the entire layer (all images)
|
||||
* @param {Float} opacity
|
||||
*/
|
||||
setOpacity: function(opacity) {
|
||||
this.opacity = opacity;
|
||||
for(var i=0; i<this.div.childNodes.length; ++i) {
|
||||
var element = this.div.childNodes[i];
|
||||
OpenLayers.Util.setOpacity(element, opacity);
|
||||
}
|
||||
},
|
||||
|
||||
/** @final @type String */
|
||||
CLASS_NAME: "OpenLayers.Layer"
|
||||
|
||||
Reference in New Issue
Block a user