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

') - .text(I18n.t('javascripts.key.title'))); + $('') + .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); @@ -47,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 () {