X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/43db18ae911fef3ad7b36e9ed27e5eff469ef863..2c84465cc2c131044cb290d596513723d4ce445a:/app/assets/javascripts/leaflet.key.js diff --git a/app/assets/javascripts/leaflet.key.js b/app/assets/javascripts/leaflet.key.js index f89ae0c3d..090583ced 100644 --- a/app/assets/javascripts/leaflet.key.js +++ b/app/assets/javascripts/leaflet.key.js @@ -34,13 +34,13 @@ L.OSM.key = function (options) { } function update() { - var layer = map.getMapBaseLayerId(), + var layerId = map.getMapBaseLayerId(), zoom = map.getZoom(); $(".mapkey-table-entry").each(function () { var data = $(this).data(); $(this).toggle( - layer === data.layer && + layerId === data.layer && (!data.zoomMin || zoom >= data.zoomMin) && (!data.zoomMax || zoom <= data.zoomMax) );