X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/71cb2c50fcaf29e2b933fc981e40a00223d94d34..2c84465cc2c131044cb290d596513723d4ce445a:/app/assets/javascripts/leaflet.key.js diff --git a/app/assets/javascripts/leaflet.key.js b/app/assets/javascripts/leaflet.key.js index 088d0f9d3..090583ced 100644 --- a/app/assets/javascripts/leaflet.key.js +++ b/app/assets/javascripts/leaflet.key.js @@ -3,7 +3,7 @@ L.OSM.key = function (options) { control.onAddPane = function (map, button, $ui) { var $section = $("
") - .attr("class", "section") + .attr("class", "p-3") .appendTo($ui); $ui @@ -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) );