OpenLayers OpenLayers

Changeset 2917

Show
Ignore:
Timestamp:
03/28/07 18:46:50 (2 years ago)
Author:
sderle
Message:

Remove event listeners on image div in Tile.Image.destroy(). Fixes #576.

Files:

Legend:

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

    r2231 r2917  
    3333     */ 
    3434    destroy: function() { 
    35         if ((this.imgDiv != null) && (this.imgDiv.parentNode == this.layer.div)) { 
    36             this.layer.div.removeChild(this.imgDiv); 
    37             this.imgDiv.map = null; 
     35        if (this.imgDiv != null)  { 
     36            OpenLayers.Event.stopObservingElement(this.imgDiv.id); 
     37            if (this.imgDiv.parentNode == this.layer.div) { 
     38                this.layer.div.removeChild(this.imgDiv); 
     39                this.imgDiv.map = null; 
     40            } 
    3841        } 
    3942        this.imgDiv = null;