aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuilhem Moulin <guilhem@fripost.org>2025-10-05 09:46:42 +0200
committerGuilhem Moulin <guilhem@fripost.org>2025-10-05 18:13:17 +0200
commit9de8f03c734efea8cbb881d1d25c6f18a2a258b2 (patch)
tree264556cb9912bfcbcd93793d66dc7ce06c553832
parenta403a0ccfac410f8f2fde4100c16ac536c826ad7 (diff)
Also show popover on smaller screens.
(Within reasons.) Mobile viewports have width <576px, yet should be able to see popover.
-rw-r--r--main.js3
-rw-r--r--style.css2
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;
}