Inform iconLayers when we change current tilelayer

When an editor change the background layer from our own selector,
we need to inform iconLayers, so it can update its list and order
accordingly
This commit is contained in:
Yohan Boniface 2023-12-16 18:50:08 +01:00
parent 426297df4f
commit 629a049eba

View file

@ -1208,7 +1208,9 @@ L.U.TileLayerControl = L.Control.IconLayers.extend({
} }
const maxShown = 10 const maxShown = 10
L.Control.IconLayers.prototype.setLayers.call(this, layers.slice(0, maxShown)) L.Control.IconLayers.prototype.setLayers.call(this, layers.slice(0, maxShown))
if (this.map.selected_tilelayer) this.setActiveLayer(this.map.selected_tilelayer)
}, },
}) })
/* Used in edit mode to define the default tilelayer */ /* Used in edit mode to define the default tilelayer */