Changeset 4927
- Timestamp:
- 10/11/07 21:36:12 (1 year ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Feature.js (modified) (2 diffs)
- trunk/openlayers/tests/test_Feature.html (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Feature.js
r4225 r4927 180 180 var anchor = (this.marker) ? this.marker.icon : null; 181 181 182 this.popup = new this.popupClass(id, 183 this.lonlat, 184 this.data.popupSize, 185 this.data.popupContentHTML, 186 anchor, 187 closeBox); 188 182 if (!this.popup) { 183 this.popup = new this.popupClass(id, 184 this.lonlat, 185 this.data.popupSize, 186 this.data.popupContentHTML, 187 anchor, 188 closeBox); 189 } 189 190 if (this.data.overflow != null) { 190 191 this.popup.contentDiv.style.overflow = this.data.overflow; … … 205 206 */ 206 207 destroyPopup: function() { 207 this.popup.feature = null; 208 this.popup.destroy() 208 if (this.popup) { 209 this.popup.feature = null; 210 this.popup.destroy(); 211 this.popup = null; 212 } 209 213 }, 210 214 trunk/openlayers/tests/test_Feature.html
r4302 r4927 122 122 123 123 function test_04_Feature_createPopup(t) { 124 t.plan(1 7);124 t.plan(11); 125 125 126 126 //no lonlat … … 188 188 189 189 OpenLayers.Feature.prototype.destroyPopup.apply(f, []); 190 t.ok(f.popup .feature == null, "popup's 'feature'property nullified on destroy");190 t.ok(f.popup == null, "popup property nullified on destroy"); 191 191 } 192 192
