X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/a6ac56c5e510395d160cdb7ccc7a88d87403e687..c30f20122d1f2f0f49240aae17d1233dd745e1e5:/app/assets/javascripts/leaflet.key.js diff --git a/app/assets/javascripts/leaflet.key.js b/app/assets/javascripts/leaflet.key.js index 9fe457851..c5124e39d 100644 --- a/app/assets/javascripts/leaflet.key.js +++ b/app/assets/javascripts/leaflet.key.js @@ -14,13 +14,23 @@ L.OSM.key = function (options) { .appendTo($container); var $ui = $('
') - .attr('class', 'layers-ui'); + .attr('class', 'key-ui'); - $('

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

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