OpenLayers OpenLayers

Changeset 1332

Show
Ignore:
Timestamp:
08/22/06 14:37:05 (2 years ago)
Author:
crschmidt
Message:

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.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/openlayers/2.0/lib/OpenLayers/Layer/EventPane.js

    r1211 r1332  
    3838            if (this.pane == null) { 
    3939                this.pane = OpenLayers.Util.createDiv(); 
    40                 this.pane.style.width = "100%"; 
    41                 this.pane.style.height = "100%"; 
    42                 this.pane.style.backgroundColor = "transparent"; 
    4340            } 
    4441        } 
     
    5350    setMap: function(map) { 
    5451        OpenLayers.Layer.prototype.setMap.apply(this, arguments); 
    55  
     52         
    5653        this.pane.style.zIndex = parseInt(this.div.style.zIndex) + 1; 
    5754        this.pane.style.display = this.div.style.display; 
     55        this.pane.style.width="100%"; 
     56        this.pane.style.height="100%"; 
     57        if (/MSIE/.test(navigator.userAgent)) { 
     58          this.pane.style.background = "url("+OpenLayers.Util.getImagesLocation()+"blank.gif)"; 
     59        } 
     60 
    5861        if (this.isFixed) { 
    5962            this.map.viewPortDiv.appendChild(this.pane);