Skip to content

Commit

Permalink
Fixed body
Browse files Browse the repository at this point in the history
  • Loading branch information
bonny committed May 19, 2024
1 parent f86ba30 commit 7f0c110
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions resources/views/components/events-map.blade.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,14 @@
imgMinimize.src = '/img/collapse_content_24dp_FILL0_wght400_GRAD0_opsz24.svg';
L.DomEvent.on(expandButton, 'click', function(evt) {
// console.log("click expand", evt);
// evt.stopPropagation();
let isExpanded = map.getContainer().classList.contains('is-expanded');
if (isExpanded) {
document.body.classList.remove('map-is-expanded');
map.getContainer().classList.remove('is-expanded');
map.gestureHandling.enable();
} else {
document.body.classList.add('map-is-expanded');
map.getContainer().classList.add('is-expanded');
map.gestureHandling.disable();
// Få plats med Sverige.
Expand Down Expand Up @@ -462,6 +462,15 @@ function setVarsBasedOnAd(adElm) {
background-image: url('/img/share-img-blur.jpg');
}
body.map-is-expanded {
overflow: hidden;
position: fixed;
top: 0;
right: 0;
bottom: 0;
left: 0;
}
.EventsMap.is-expanded {
position: fixed !important;
height: calc(100% - var(--header-elms-height) - var(--ad-bottom-height));
Expand Down

0 comments on commit 7f0c110

Please sign in to comment.