OpenLayers OpenLayers

Changeset 2858

Show
Ignore:
Timestamp:
03/22/07 15:47:48 (2 years ago)
Author:
euzuro
Message:

second patch to fix #549. this time, instead of just clearing out everything in the div, it removes only what it added.

Files:

Legend:

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

    r2844 r2858  
    229229            this.controls = null; 
    230230        } 
    231         this.div.innerHTML = ""; 
     231        if (this.viewPortDiv) { 
     232            this.div.removeChild(this.viewPortDiv); 
     233        } 
     234        this.viewPortDiv = null; 
    232235    }, 
    233236 
  • trunk/openlayers/tests/test_Map.html

    r2855 r2858  
    368368        t.eq( map.layers, null, "map.layers is null after destroy" ); 
    369369        t.eq( map.controls, null, "map.controls is null after destroy" ); 
    370         t.eq( map.div.innerHTML, "", "map's div cleared out"); 
     370        t.eq( map.viewPortDiv, null, "map's viewportDiv nullified"); 
    371371    } 
    372372  // -->