Changeset 6495
- Timestamp:
- 03/12/08 08:53:34 (10 months ago)
- Files:
-
- trunk/openlayers/lib/OpenLayers/Layer/Grid.js (modified) (3 diffs)
- trunk/openlayers/lib/OpenLayers/Layer/WFS.js (modified) (2 diffs)
- trunk/openlayers/lib/OpenLayers/Tile.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/openlayers/lib/OpenLayers/Layer/Grid.js
r6437 r6495 548 548 }; 549 549 tile.events.register("loadend", this, tile.onLoadEnd); 550 tile.events.register("unload", this, tile.onLoadEnd); 550 551 }, 551 552 … … 559 560 */ 560 561 removeTileMonitoringHooks: function(tile) { 562 tile.unload() 561 563 tile.events.un({ 562 564 "loadstart": tile.onLoadStart, 563 565 "loadend": tile.onLoadEnd, 566 "unload": tile.onLoadEnd, 564 567 scope: this 565 568 }); … … 701 704 onMapResize: function() { 702 705 if (this.singleTile) { 706 this.clearGrid(); 703 707 this.setTileSize(); 704 708 } trunk/openlayers/lib/OpenLayers/Layer/WFS.js
r6422 r6495 342 342 }; 343 343 tile.events.register("loadend", tile, tile.onLoadEnd); 344 tile.events.register("unload", tile, tile.onLoadEnd); 344 345 }, 345 346 … … 353 354 */ 354 355 removeTileMonitoringHooks: function(tile) { 356 tile.unload(); 355 357 tile.events.un({ 356 358 "loadstart": tile.onLoadStart, 357 359 "loadend": tile.onLoadEnd, 360 "unload": tile.onLoadEnd, 358 361 scope: tile 359 362 }); trunk/openlayers/lib/OpenLayers/Tile.js
r6452 r6495 26 26 * {Array(String)} Supported application event types 27 27 */ 28 EVENT_TYPES: [ "loadstart", "loadend", "reload" ],28 EVENT_TYPES: [ "loadstart", "loadend", "reload", "unload"], 29 29 30 30 /** … … 137 137 138 138 this.events = new OpenLayers.Events(this, null, this.EVENT_TYPES); 139 }, 140 141 /** 142 * Method: unload 143 * Call immediately before destroying if you are listening to tile 144 * events, so that counters are properly handled if tile is still 145 * loading at destroy-time. Will only fire an event if the tile is 146 * still loading. 147 */ 148 unload: function() { 149 if (this.isLoading) { 150 this.isLoading = false; 151 this.events.triggerEvent("unload"); 152 } 139 153 }, 140 154
