From 9de8f03c734efea8cbb881d1d25c6f18a2a258b2 Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Sun, 5 Oct 2025 09:46:42 +0200 Subject: Also show popover on smaller screens. (Within reasons.) Mobile viewports have width <576px, yet should be able to see popover. --- main.js | 3 +-- style.css | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/main.js b/main.js index 60233de..2822cf4 100644 --- a/main.js +++ b/main.js @@ -5282,8 +5282,7 @@ const disposePopover = (function() { popover.dispose(); } - const size = event.map.getSize(); - if (size[0] < 576 || size[1] < 576) { + if (window.innerWidth < 200) { return; /* skip popover if the map is too small */ } diff --git a/style.css b/style.css index b4c7f54..fb413d7 100644 --- a/style.css +++ b/style.css @@ -560,7 +560,7 @@ body.inprogress { --bs-popover-body-padding-y: .5rem; --bs-popover-header-bg: var(--bs-popover-bg); --bs-popover-zindex: 1000; - --bs-popover-max-width: 450px; + --bs-popover-max-width: min(450px, 90vw); width: var(--bs-popover-max-width); pointer-events: auto; } -- cgit v1.2.3