mirror of
https://github.com/umap-project/umap.git
synced 2025-04-29 20:02:36 +02:00
fix: only show + button in tilelayer switcher when more available
This commit is contained in:
parent
33b0f6c318
commit
ca75955ca9
1 changed files with 1 additions and 1 deletions
|
@ -801,7 +801,7 @@ U.TileLayerControl = L.Control.IconLayers.extend({
|
||||||
|
|
||||||
_createLayerElements: function () {
|
_createLayerElements: function () {
|
||||||
L.Control.IconLayers.prototype._createLayerElements.call(this)
|
L.Control.IconLayers.prototype._createLayerElements.call(this)
|
||||||
if (Object.keys(this._layers) <= this.maxShown) return
|
if (Object.keys(this._layers).length <= this.maxShown) return
|
||||||
const lastRow = this._container.querySelector(
|
const lastRow = this._container.querySelector(
|
||||||
'.leaflet-iconLayers-layersRow:last-child'
|
'.leaflet-iconLayers-layersRow:last-child'
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue