X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/8e1e1e47134b652bd1a5facba44280f05cc802fa..e6b0e1ae7ef45b87a61f18bb50296273d6dd1bfb:/app/assets/javascripts/leaflet.sidebar.js?ds=inline diff --git a/app/assets/javascripts/leaflet.sidebar.js b/app/assets/javascripts/leaflet.sidebar.js index 1c911a961..910da53f2 100644 --- a/app/assets/javascripts/leaflet.sidebar.js +++ b/app/assets/javascripts/leaflet.sidebar.js @@ -1,7 +1,7 @@ L.OSM.sidebar = function (selector) { - var control = {}, - sidebar = $(selector), - current = $(), + const control = {}, + sidebar = $(selector); + let current = $(), currentButton = $(), map; @@ -17,9 +17,9 @@ L.OSM.sidebar = function (selector) { }; control.togglePane = function (pane, button) { - var mediumDeviceWidth = window.getComputedStyle(document.documentElement).getPropertyValue("--bs-breakpoint-md"); - var isMediumDevice = window.matchMedia(`(max-width: ${mediumDeviceWidth})`).matches; - var paneWidth = 250; + const mediumDeviceWidth = window.getComputedStyle(document.documentElement).getPropertyValue("--bs-breakpoint-md"); + const isMediumDevice = window.matchMedia(`(max-width: ${mediumDeviceWidth})`).matches; + const paneWidth = 250; current .hide()