CanvasTileLayer: Scroll to part when needed.

For file based view.

Signed-off-by: Gökay Şatır <gokay.satir@collabora.com>
Change-Id: I4902090ccf96dc834d8792c1637dd1a8833cc20f
This commit is contained in:
Gökay Şatır 2021-05-26 14:01:40 +03:00 committed by Gökay ŞATIR
parent e6ea17e1a0
commit eaf3772489

View file

@ -5509,8 +5509,11 @@ L.CanvasTileLayer = L.Layer.extend({
this._sortFileBasedQueue(queue);
if (queue.length > 0) {
this._selectedPart = this._getMostVisiblePart(queue);
this._preview._scrollToPart();
var partToSelect = this._getMostVisiblePart(queue);
if (this._selectedPart !== partToSelect) {
this._selectedPart = partToSelect;
this._preview._scrollToPart();
}
}
if (checkOnly) {