Don't load class leaflet-tile-loaded in case of error (#4980)
This commit is contained in:
parent
c624a3ed50
commit
6b0808d6f0
@ -811,14 +811,16 @@ L.GridLayer = L.Layer.extend({
|
|||||||
this._pruneTiles();
|
this._pruneTiles();
|
||||||
}
|
}
|
||||||
|
|
||||||
L.DomUtil.addClass(tile.el, 'leaflet-tile-loaded');
|
if (!err) {
|
||||||
|
L.DomUtil.addClass(tile.el, 'leaflet-tile-loaded');
|
||||||
|
|
||||||
// @event tileload: TileEvent
|
// @event tileload: TileEvent
|
||||||
// Fired when a tile loads.
|
// Fired when a tile loads.
|
||||||
this.fire('tileload', {
|
this.fire('tileload', {
|
||||||
tile: tile.el,
|
tile: tile.el,
|
||||||
coords: coords
|
coords: coords
|
||||||
});
|
});
|
||||||
|
}
|
||||||
|
|
||||||
if (this._noTilesToLoad()) {
|
if (this._noTilesToLoad()) {
|
||||||
this._loading = false;
|
this._loading = false;
|
||||||
|
Loading…
Reference in New Issue
Block a user