1
0
forked from MTSR/mapserver

Prevent POI image from vertically overflowing too much (#395)

This commit is contained in:
1F616EMO~nya 2024-07-05 19:52:39 +08:00 committed by GitHub
parent 3be317d09f
commit 02bb99f739
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 2 deletions

View File

@ -49,6 +49,12 @@ body {
grid-area: info; grid-area: info;
} }
.poi_image_container {
width: 100%;
max-height: 75vh;
overflow-y: auto;
}
.poi_image { .poi_image {
width: 100%; width: 100%;
height: auto; height: auto;

View File

@ -30,8 +30,9 @@ export default AbstractIconOverlay.extend({
} }
if (poi.attributes.image) { if (poi.attributes.image) {
innerHTML += "<img class=\"poi_image\" src=\"" + HtmlSanitizer.SanitizeHtml(poi.attributes.image) + innerHTML += "<div class=\"poi_image_container\">" +
"\" crossorigin=\"anonymous\" referrerpolicy=\"origin-when-cross-origin\">"; "<img class=\"poi_image\" src=\"" + HtmlSanitizer.SanitizeHtml(poi.attributes.image) +
"\" crossorigin=\"anonymous\" referrerpolicy=\"origin-when-cross-origin\"></div>";
} }
innerHTML += "<hr><b>Owner: </b> " + HtmlSanitizer.SanitizeHtml(poi.attributes.owner) + "<br>"; innerHTML += "<hr><b>Owner: </b> " + HtmlSanitizer.SanitizeHtml(poi.attributes.owner) + "<br>";