1 L.OSM.sidebar = function (selector) {
8 control.addTo = function (_) {
13 control.addPane = function (pane) {
19 control.togglePane = function (pane, button) {
20 var mediumDeviceWidth = window.getComputedStyle(document.documentElement).getPropertyValue("--bs-breakpoint-md");
21 var isMediumDevice = window.matchMedia(`(max-width: ${mediumDeviceWidth})`).matches;
29 .removeClass("active");
31 if (current === pane) {
33 $("#content").addClass("overlay-right-sidebar");
34 current = currentButton = $();
36 map.panBy([0, -$("#map").height() / 2], { animate: false });
37 } else if ($("html").attr("dir") === "rtl") {
38 map.panBy([-paneWidth, 0], { animate: false });
42 $("#content").removeClass("overlay-right-sidebar");
44 currentButton = button || $();
46 map.panBy([0, $("#map").height()], { animate: false });
47 } else if ($("html").attr("dir") === "rtl") {
48 map.panBy([paneWidth, 0], { animate: false });
52 map.invalidateSize({ pan: false, animate: false });