Skip to content

Commit 0dce451

Browse files
committed
test release
1 parent 7bcd096 commit 0dce451

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

src/DGCustomization/src/DGMobileImprove.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -426,6 +426,23 @@ L.MobileTileLayer = L.TileLayer.extend({
426426
tile = this._tiles[key];
427427
if (!tile) { return; }
428428

429+
// Если у тайла уже есть оригинальная (не пожатая) картинка,
430+
// то заменим превью на нее
431+
if (tile.originalEl && tile.el.parentNode) {
432+
tile.el.parentNode.replaceChild(tile.originalEl, tile.el);
433+
tile.el = tile.originalEl;
434+
435+
tile.originalEl = null;
436+
tile.preview = false;
437+
438+
// Если у тайла есть только превью, то добавим его на карту
439+
// И начнем грузить оригинальный
440+
} else if (tile.preview) {
441+
tile.originalEl = this.createTile(this._wrapCoords(coords), L.bind(this._tileReady, this, coords), this._url);
442+
this._initTile(tile.originalEl);
443+
L.DomUtil.setPosition(tile.originalEl, this._getTilePos(coords));
444+
}
445+
429446
tile.loaded = +new Date();
430447
tile.active = true;
431448
this._pruneTiles();

0 commit comments

Comments
 (0)