Permalink
Browse files

Overriding onImageLoad to set the opacity on the correct element.

  • Loading branch information...
1 parent 179433d commit fc0b15ad45a1f6c23d9ae10c8149242adb84c894 @ahocevar ahocevar committed Apr 24, 2012
Showing with 13 additions and 0 deletions.
  1. +13 −0 lib/OpenLayers/Tile/Image/IFrame.js
@@ -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

0 comments on commit fc0b15a

Please sign in to comment.