fixed map overlapping modals
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s

This commit is contained in:
Tudor
2026-01-09 08:42:38 +00:00
parent b0e2a42acc
commit ea3f65249e

View File

@@ -225,7 +225,6 @@ function navigateTo(path) {
function handleRoute() { function handleRoute() {
let path = window.location.pathname; let path = window.location.pathname;
console.log("handleRoute called, pathname:", path);
// Normalize path - treat /index.html, empty, or just "/" as home // Normalize path - treat /index.html, empty, or just "/" as home
if (path === "" || path === "/index.html" || path.endsWith("/index.html")) { if (path === "" || path === "/index.html" || path.endsWith("/index.html")) {
@@ -233,7 +232,6 @@ function handleRoute() {
} }
const view = routes[path] || "home"; const view = routes[path] || "home";
console.log("Resolved view:", view, "for path:", path);
// Update page title for SEO // Update page title for SEO
document.title = pageTitles[view] || pageTitles.home; document.title = pageTitles[view] || pageTitles.home;
@@ -1153,6 +1151,11 @@ function updateComparisonTable(comparison, metric, years) {
} }
async function openSchoolModal(urn) { async function openSchoolModal(urn) {
// Hide all school maps to prevent z-index overlap with modal
document.querySelectorAll('.school-map').forEach(el => {
el.style.visibility = 'hidden';
});
// Show loading state immediately // Show loading state immediately
elements.modal.classList.add("active"); elements.modal.classList.add("active");
document.body.style.overflow = "hidden"; document.body.style.overflow = "hidden";
@@ -1330,6 +1333,11 @@ function closeModal() {
elements.modal.classList.remove("active"); elements.modal.classList.remove("active");
document.body.style.overflow = ""; document.body.style.overflow = "";
state.currentSchoolData = null; state.currentSchoolData = null;
// Restore visibility of school maps
document.querySelectorAll('.school-map').forEach(el => {
el.style.visibility = 'visible';
});
} }
function addToComparison(school) { function addToComparison(school) {