Permalink
Browse files

Fix Gah in the gah branch instead

  • Loading branch information...
1 parent 18d251d commit 4e8444adfd7df383d396df86438659ac6b8e5387 @tmcw tmcw committed Feb 22, 2012
Showing with 7 additions and 7 deletions.
  1. +3 −3 modestmaps.js
  2. +1 −1 modestmaps.min.js
  3. +3 −3 src/layer.js
View
@@ -1762,7 +1762,7 @@ var MM = com.modestmaps = {
provider: null,
recentTiles: null,
- recentTilesById: null,
+ recentTilesById: {},
enablePyramidLoading: false,
@@ -2172,7 +2172,7 @@ var MM = com.modestmaps = {
});
}
- while (this.tileCacheSize > maxTiles) {
+ while (this.recentTiles.length && this.tileCacheSize > maxTiles) {
// delete the oldest record
var tileRecord = this.recentTiles.pop();
var now = new Date().getTime();
@@ -2183,7 +2183,7 @@ var MM = com.modestmaps = {
var tile = this.tiles[tileRecord.id];
if (tile.parentNode) {
// I'm leaving this uncommented for now but you should never see it:
- alert("Gah: trying to remove cached tile even though it's still in the DOM");
+ // alert("Gah: trying to remove cached tile even though it's still in the DOM");
} else {
delete this.tiles[tileRecord.id];
this.tileCacheSize--;
View
View
@@ -28,7 +28,7 @@
provider: null,
recentTiles: null,
- recentTilesById: null,
+ recentTilesById: {},
enablePyramidLoading: false,
@@ -438,7 +438,7 @@
});
}
- while (this.tileCacheSize > maxTiles) {
+ while (this.recentTiles.length && this.tileCacheSize > maxTiles) {
// delete the oldest record
var tileRecord = this.recentTiles.pop();
var now = new Date().getTime();
@@ -449,7 +449,7 @@
var tile = this.tiles[tileRecord.id];
if (tile.parentNode) {
// I'm leaving this uncommented for now but you should never see it:
- alert("Gah: trying to remove cached tile even though it's still in the DOM");
+ // alert("Gah: trying to remove cached tile even though it's still in the DOM");
} else {
delete this.tiles[tileRecord.id];
this.tileCacheSize--;

0 comments on commit 4e8444a

Please sign in to comment.