Skip to content

Commit

Permalink
Overriding onImageLoad to set the opacity on the correct element.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahocevar committed Apr 24, 2012
1 parent 179433d commit fc0b15a
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions lib/OpenLayers/Tile/Image/IFrame.js
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,19 @@ OpenLayers.Tile.Image.IFrame = {
OpenLayers.Tile.Image.prototype.setImgSrc.apply(this, arguments);
}
},

/**
* Method: onImageLoad
* Handler for the image onload event
*/
onImageLoad: function() {
//TODO de-uglify opacity handling
OpenLayers.Tile.Image.prototype.onImageLoad.apply(this, arguments);
if (this.useIFrame === true) {
this.imgDiv.style.opacity = 1;
this.frame.style.opacity = this.layer.opacity;
}
},

/**
* Method: createBackBuffer
Expand Down

0 comments on commit fc0b15a

Please sign in to comment.