X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a6ac56c5e510395d160cdb7ccc7a88d87403e687..b21d0906c48065e8fdf74df30dd453bba6d4d8f2:/app/assets/javascripts/leaflet.key.js diff --git a/app/assets/javascripts/leaflet.key.js b/app/assets/javascripts/leaflet.key.js index 9fe457851..5aae3d1c2 100644 --- a/app/assets/javascripts/leaflet.key.js +++ b/app/assets/javascripts/leaflet.key.js @@ -16,9 +16,17 @@ L.OSM.key = function (options) { var $ui = $('
') .attr('class', 'layers-ui'); - $('

') - .text(I18n.t('javascripts.key.title')) - .appendTo($ui); + $('
') + .appendTo($ui) + .append( + $('') + .html('»') + .attr('class', 'close-button') + .attr('href', '#') + .bind('click', toggle)) + .append( + $('

') + .text(I18n.t('javascripts.key.title'))); var $section = $('
') .appendTo($ui); @@ -45,7 +53,7 @@ L.OSM.key = function (options) { } function update() { - var layer = getMapBaseLayerId(map), + var layer = map.getMapBaseLayerId(), zoom = map.getZoom(); $('.mapkey-table-entry').each(function () {