Don't load class leaflet-tile-loaded in case of error (#4980)

This commit is contained in:
Babajide Fowotade 2016-09-30 08:28:42 +01:00 committed by Iván Sánchez Ortega
parent c624a3ed50
commit 6b0808d6f0

View File

@ -811,6 +811,7 @@ L.GridLayer = L.Layer.extend({
this._pruneTiles();
}
if (!err) {
L.DomUtil.addClass(tile.el, 'leaflet-tile-loaded');
// @event tileload: TileEvent
@ -819,6 +820,7 @@ L.GridLayer = L.Layer.extend({
tile: tile.el,
coords: coords
});
}
if (this._noTilesToLoad()) {
this._loading = false;