OpenLayers OpenLayers

Changeset 6693

Show
Ignore:
Timestamp:
03/28/08 22:02:29 (10 months ago)
Author:
euzuro
Message:

clean up the popup's destroy()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/euzuro/pop/lib/OpenLayers/Popup.js

    r6650 r6693  
    225225     */ 
    226226    destroy: function() { 
     227 
     228        this.id = null; 
     229        this.lonlat = null; 
     230        this.size = null; 
     231        this.contentHTML = null; 
     232         
     233        this.backgroundColor = null; 
     234        this.opacity = null; 
     235        this.border = null; 
     236         
     237        this.events.destroy(); 
     238        this.events = null; 
     239         
     240        if (this.closeDiv) { 
     241            OpenLayers.Event.stopObservingElement(this.closeDiv);  
     242            this.groupDiv.removeChild(this.closeDiv); 
     243        } 
     244        this.closeDiv = null; 
     245         
     246        this.div.removeChild(this.groupDiv); 
     247        this.groupDiv = null; 
     248 
    227249        if (this.map != null) { 
    228250            this.map.removePopup(this); 
    229             this.map = null; 
    230         } 
    231         this.events.destroy(); 
    232         this.events = null; 
     251        } 
     252        this.map = null; 
    233253        this.div = null; 
    234          
    235         OpenLayers.Event.stopObservingElement(this.closeDiv);  
    236         this.closeDiv = null; 
    237254         
    238255        this.autoSize = null;