fixed map overlapping modals
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s
All checks were successful
Build and Push Docker Image / build-and-push (push) Successful in 57s
This commit is contained in:
@@ -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) {
|
||||||
|
|||||||
Reference in New Issue
Block a user