Bug fixes and map page banner

This commit is contained in:
Ian Renton
2026-07-25 15:06:19 +01:00
parent 4353c9ebf9
commit 7ee08e2fcd
11 changed files with 62 additions and 24 deletions
+12 -2
View File
@@ -68,8 +68,6 @@ function loadSpots() {
// now
startSSEConnection();
}
// Start the ongoing SSE connection
startSSEConnection();
});
}
@@ -594,6 +592,16 @@ function setUpMap() {
map.setView([30, 0], 3);
}
// Display the intro box, unless the user has already dismissed it once.
function displayIntroBox() {
if (localStorage.getItem("map-intro-box-dismissed") == null) {
$("#map-intro-box").show();
}
$("#map-intro-box-dismiss").click(function () {
localStorage.setItem("map-intro-box-dismissed", true);
});
}
// Startup
$(document).ready(function () {
// Close SSE connection cleanly when navigating away
@@ -609,6 +617,8 @@ $(document).ready(function () {
setUpMap();
// Call loadOptions(), this will then trigger loading spots and setting up timers.
loadOptions();
// Display intro box
displayIntroBox();
// Prevent mouse scroll and touch actions in the popup menus being passed through to the map
L.DomEvent.disableScrollPropagation(document.getElementById('settingsButtonRowMap'));
L.DomEvent.disableClickPropagation(document.getElementById('settingsButtonRowMap'));