X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/43db18ae911fef3ad7b36e9ed27e5eff469ef863..25e4a80760d29d6026df5b5fa3f2ac121dcfe957:/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) );