From a37c6005ce9b18951340623af7662f133e2d382d Mon Sep 17 00:00:00 2001 From: Yohan Boniface Date: Mon, 25 Sep 2023 18:30:58 +0200 Subject: [PATCH] Set an explicit width to popup large container Until now, the width was computed on the fly by Leaflet, based on the popup content, but this leads to a bunch of issue on image/iframe width. cf https://forum.openstreetmap.fr/t/bugs-divers-relevees-sur-une-umap-absent-sur-une-autre/17254/8 --- umap/static/umap/map.css | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/umap/static/umap/map.css b/umap/static/umap/map.css index 3ffe7c52..faa8b9c6 100644 --- a/umap/static/umap/map.css +++ b/umap/static/umap/map.css @@ -1463,12 +1463,14 @@ a.add-datalayer:hover, .leaflet-contextmenu-icon { display: none; } -.umap-popup-large img, .umap-popup-large iframe { /* See https://github.com/Leaflet/Leaflet/commit/61d746818b99d362108545c151a27f09d60960ee#commitcomment-6061847 */ max-width: 100% !important; min-width: 500px; } +.umap-popup-large .umap-popup-content { + width: 500px; +} .umap-popup-content img { max-width: 100%; } @@ -1534,10 +1536,12 @@ a.add-datalayer:hover, .umap-permanent-credits-container { max-width: 100%; } - .umap-popup-large img, .umap-popup-large iframe { min-width: 300px; } + .umap-popup-large .umap-popup-content { + width: 300px; + } } /* ****** */