X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/89a132d31c8ca3b446c716860e55bf31bc811bd0..6d9d688080ebcf166addb868b8fceeee55c3e700:/app/assets/javascripts/leaflet.key.js?ds=sidebyside diff --git a/app/assets/javascripts/leaflet.key.js b/app/assets/javascripts/leaflet.key.js index 3f71932fb..68e822e7f 100644 --- a/app/assets/javascripts/leaflet.key.js +++ b/app/assets/javascripts/leaflet.key.js @@ -6,7 +6,7 @@ L.OSM.key = function (options) { .attr('class', 'control-key'); var button = $('') - .attr('class', 'control-button mobile-hide') + .attr('class', 'control-button') .attr('href', '#') .html('') .on('click', toggle) @@ -56,15 +56,17 @@ L.OSM.key = function (options) { if (!button.hasClass('disabled')) { options.sidebar.togglePane($ui, button); } + $('.leaflet-control .control-button').tooltip('hide'); } function updateButton() { - var disabled = map.getMapBaseLayerId() !== 'mapnik' + var disabled = map.getMapBaseLayerId() !== 'mapnik'; button .toggleClass('disabled', disabled) - .attr('data-original-title', I18n.t(disabled ? - 'javascripts.key.tooltip_disabled' : - 'javascripts.key.tooltip')) + .attr('data-original-title', + I18n.t(disabled ? + 'javascripts.key.tooltip_disabled' : + 'javascripts.key.tooltip')); } function update() { @@ -73,7 +75,7 @@ L.OSM.key = function (options) { $('.mapkey-table-entry').each(function () { var data = $(this).data(); - if (layer == data.layer && zoom >= data.zoomMin && zoom <= data.zoomMax) { + if (layer === data.layer && zoom >= data.zoomMin && zoom <= data.zoomMax) { $(this).show(); } else { $(this).hide();