OpenLayers OpenLayers

Changeset 6068

Show
Ignore:
Timestamp:
02/07/08 23:18:13 (1 year ago)
Author:
crschmidt
Message:

Layers with the 'alpha' flag set to true never register proper load events, so
they never fire loadend events. r=euz (Closes #1336)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/lib/OpenLayers/Tile/Image.js

    r6012 r6068  
    7878    destroy: function() { 
    7979        if (this.imgDiv != null)  { 
    80             OpenLayers.Event.stopObservingElement(this.imgDiv.id); 
     80            if (this.layerAlphaHack) { 
     81                OpenLayers.Event.stopObservingElement(this.imgDiv.childNodes[0].id);                 
     82            } else { 
     83                OpenLayers.Event.stopObservingElement(this.imgDiv.id); 
     84            } 
    8185            if (this.imgDiv.parentNode == this.frame) { 
    8286                this.frame.removeChild(this.imgDiv); 
     
    247251            } 
    248252        }; 
    249         OpenLayers.Event.observe(this.imgDiv, 'load', 
    250                                  OpenLayers.Function.bind(onload, this)); 
     253         
     254        if (this.layerAlphaHack) {  
     255            OpenLayers.Event.observe(this.imgDiv.childNodes[0], 'load',  
     256                                     OpenLayers.Function.bind(onload, this));     
     257        } else {  
     258            OpenLayers.Event.observe(this.imgDiv, 'load',  
     259                                 OpenLayers.Function.bind(onload, this));  
     260        }  
     261         
    251262 
    252263        // Bind a listener to the onerror of the image div so that we