diff options
author | Guilhem Moulin <guilhem@fripost.org> | 2025-10-05 09:46:42 +0200 |
---|---|---|
committer | Guilhem Moulin <guilhem@fripost.org> | 2025-10-05 18:13:17 +0200 |
commit | 9de8f03c734efea8cbb881d1d25c6f18a2a258b2 (patch) | |
tree | 264556cb9912bfcbcd93793d66dc7ce06c553832 | |
parent | a403a0ccfac410f8f2fde4100c16ac536c826ad7 (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.js | 3 | ||||
-rw-r--r-- | style.css | 2 |
2 files changed, 2 insertions, 3 deletions
@@ -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 */ } @@ -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; } |