Skip to content

Commit

Permalink
Prevent POI image from vertically overflowing too much (#395)
Browse files Browse the repository at this point in the history
  • Loading branch information
Emojigit authored Jul 5, 2024
1 parent 3be317d commit 02bb99f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
6 changes: 6 additions & 0 deletions public/css/custom.css
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,12 @@ body {
grid-area: info;
}

.poi_image_container {
width: 100%;
max-height: 75vh;
overflow-y: auto;
}

.poi_image {
width: 100%;
height: auto;
Expand Down
5 changes: 3 additions & 2 deletions public/js/map/overlays/PoiOverlay.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,9 @@ export default AbstractIconOverlay.extend({
}

if (poi.attributes.image) {
innerHTML += "<img class=\"poi_image\" src=\"" + HtmlSanitizer.SanitizeHtml(poi.attributes.image) +
"\" crossorigin=\"anonymous\" referrerpolicy=\"origin-when-cross-origin\">";
innerHTML += "<div class=\"poi_image_container\">" +
"<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>";
Expand Down

0 comments on commit 02bb99f

Please sign in to comment.