IE will not catch events on a div which has no content in it. (Why? Who

knows!) However, if we set a background on the div, it works -- but not
if that background is transparent. It has to have some thing. So, if 
we're in IE, we use our handy dandy notebook!, er, blank.gif, to populate
a background so that the EventPane will work. 

If someone can fix this, please do.


git-svn-id: http://svn.openlayers.org/branches/openlayers/2.0@1332 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2006-08-22 18:37:05 +00:00
parent deaebf8733
commit f6a50a37fc
2 changed files with 7 additions and 4 deletions

View File

@@ -37,9 +37,6 @@ OpenLayers.Layer.EventPane.prototype =
if (arguments.length > 0) {
if (this.pane == null) {
this.pane = OpenLayers.Util.createDiv();
this.pane.style.width = "100%";
this.pane.style.height = "100%";
this.pane.style.backgroundColor = "transparent";
}
}
},
@@ -52,9 +49,15 @@ OpenLayers.Layer.EventPane.prototype =
*/
setMap: function(map) {
OpenLayers.Layer.prototype.setMap.apply(this, arguments);
this.pane.style.zIndex = parseInt(this.div.style.zIndex) + 1;
this.pane.style.display = this.div.style.display;
this.pane.style.width="100%";
this.pane.style.height="100%";
if (/MSIE/.test(navigator.userAgent)) {
this.pane.style.background = "url("+OpenLayers.Util.getImagesLocation()+"blank.gif)";
}
if (this.isFixed) {
this.map.viewPortDiv.appendChild(this.pane);
} else {