diff --git a/public/js/app.js b/public/js/app.js index f68997b..8df37cd 100644 --- a/public/js/app.js +++ b/public/js/app.js @@ -220,6 +220,21 @@ sidebar = L.control.sidebar({ position: 'left' }).addTo(map); +// Hides Map Controls on Mobile while Sidebar is open +sidebar.on('content', function () { + if (window.innerWidth < 769) { + document.querySelectorAll('.leaflet-top.leaflet-right').forEach(function (el) { + el.style.display = 'none'; + }); + } +}); + +sidebar.on('closing', function () { + document.querySelectorAll('.leaflet-top.leaflet-right').forEach(function (el) { + el.style.display = ''; + }); +}); + // ===================================================================== // Block 6: Geoman Drawing Tools and CRUD Trigger