Skip to content

Commit

Permalink
Fix Gah in the gah branch instead
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw committed Feb 22, 2012
1 parent 18d251d commit 4e8444a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
6 changes: 3 additions & 3 deletions modestmaps.js
Expand Up @@ -1762,7 +1762,7 @@ var MM = com.modestmaps = {

provider: null,
recentTiles: null,
recentTilesById: null,
recentTilesById: {},

enablePyramidLoading: false,

Expand Down Expand Up @@ -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();
Expand All @@ -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--;
Expand Down
2 changes: 1 addition & 1 deletion modestmaps.min.js

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions src/layer.js
Expand Up @@ -28,7 +28,7 @@

provider: null,
recentTiles: null,
recentTilesById: null,
recentTilesById: {},

enablePyramidLoading: false,

Expand Down Expand Up @@ -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();
Expand All @@ -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--;
Expand Down

0 comments on commit 4e8444a

Please sign in to comment.