X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/7f3cb3c6246e6e271761e714cceb081e85a4d245..b3c5010e143fb2e9491ddb34f36f59a698da7fea:/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) );