Skip to content
This repository has been archived by the owner on Oct 15, 2024. It is now read-only.

Commit

Permalink
modal hide fix
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren committed May 16, 2024
1 parent 6af1d62 commit a392450
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion portals/portals.js
Original file line number Diff line number Diff line change
Expand Up @@ -158,11 +158,12 @@ siteButtons.forEach(function(siteButton) {
}
});

let mapsModal;
function showModal(site) {
document.getElementById('googleMapLink').href = links[site]['google'];
document.getElementById('appleMapLink').href = links[site]['apple'];
document.getElementById('wazeMapLink').href = links[site]['waze'];
let mapsModal = new bootstrap.Modal(document.getElementById('mapsModal'), {
mapsModal = new bootstrap.Modal(document.getElementById('mapsModal'), {
keyboard: false
});
mapsModal.show();
Expand Down Expand Up @@ -222,6 +223,7 @@ function showPortal(site) {
hasOpenedOnce = true;
let src = site.url;
if (portalFrame.src != src) portalFrame.src = src + "&description=A circular portal opens suddenly on the page. " + site.description;
if (mapsModal && mapsModal.hide) mapsModal.hide();
portalOpen = true;
el.style.left = '10%';
el.style.bottom = '15%';
Expand Down

0 comments on commit a392450

Please sign in to comment.