Skip to content

Commit

Permalink
Using a blankImgUrl that works for IFrames in IE9.
Browse files Browse the repository at this point in the history
  • Loading branch information
ahocevar committed Feb 20, 2012
1 parent 3fefe91 commit 221d7ca
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/OpenLayers/Tile/Image/IFrame.js
Expand Up @@ -65,7 +65,11 @@ OpenLayers.Tile.Image.IFrame = {
// And if we had an iframe we also remove the event pane. // And if we had an iframe we also remove the event pane.


if(fromIFrame) { if(fromIFrame) {
this.blankImageUrl = this._blankImageUrl;
this.frame.removeChild(this.frame.firstChild); this.frame.removeChild(this.frame.firstChild);
} else {
this._blankImageUrl = this.blankImageUrl;
this.blankImageUrl = "about:blank";
} }
} }
} }
Expand All @@ -85,7 +89,7 @@ OpenLayers.Tile.Image.IFrame = {
style.width = "100%"; style.width = "100%";
style.height = "100%"; style.height = "100%";
style.zIndex = 1; style.zIndex = 1;
style.backgroundImage = "url(" + this.blankImageUrl + ")"; style.backgroundImage = "url(" + this._blankImageUrl + ")";
this.frame.appendChild(eventPane); this.frame.appendChild(eventPane);
} }


Expand Down Expand Up @@ -133,7 +137,7 @@ OpenLayers.Tile.Image.IFrame = {
return OpenLayers.Tile.Image.prototype.getImage.apply(this, arguments); return OpenLayers.Tile.Image.prototype.getImage.apply(this, arguments);
} }
}, },

/** /**
* Method: createRequestForm * Method: createRequestForm
* Create the html <form> element with width, height, bbox and all * Create the html <form> element with width, height, bbox and all
Expand Down

0 comments on commit 221d7ca

Please sign in to comment.