Merge pull request #1304 from AleziaKurdis/placesAppDeadImagesManagement
Some checks failed
Master API-docs CI Build and Deploy / Build and deploy API-docs (push) Has been cancelled
Master Doxygen CI Build and Deploy / Build and deploy Doxygen documentation (push) Has been cancelled

Places App: Addressing ugly image "broken link" in Place Details
This commit is contained in:
ksuprynowicz 2025-02-10 20:50:14 +01:00 committed by GitHub
commit 33b288a37e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -107,7 +107,7 @@
<div id="placeDetail" class="overlay"> <div id="placeDetail" class="overlay">
<a href="javascript:void(0)" class="closebtn" onclick="closeDetail();">&times;</a> <a href="javascript:void(0)" class="closebtn" onclick="closeDetail();">&times;</a>
<div class="overlay-content"> <div class="overlay-content">
<img id="placeDetail-image" onclick="closeDetail();" draggable="false"> <div id="placeDetail-image" onclick="closeDetail();" draggable="false"></div>
<div id="placeDetail-placeName"></div> <div id="placeDetail-placeName"></div>
<table width='100%'> <table width='100%'>
<tr valign='top'> <tr valign='top'>
@ -775,12 +775,17 @@
} }
} }
document.getElementById("placeDetail-image").src = ""; var pictureUrl = "";
if (placeDetail.thumbnail === "") { if (placeDetail.thumbnail === "") {
document.getElementById("placeDetail-image").src = "icons/placeholder_" + placeDetail.metaverseRegion + ".jpg"; pictureUrl = "icons/placeholder_" + placeDetail.metaverseRegion + ".jpg";
} else { } else {
document.getElementById("placeDetail-image").src = placeDetail.thumbnail; pictureUrl = placeDetail.thumbnail;
} }
document.getElementById("placeDetail-image").style.backgroundImage = "url(" + pictureUrl + ")";
document.getElementById("placeDetail-image").style.backgroundRepeat = "no-repeat";
document.getElementById("placeDetail-image").style.backgroundPosition = "center center";
document.getElementById("placeDetail-image").style.backgroundSize = "cover";
document.getElementById("placeDetail-placeName").innerHTML = placeDetail.name; document.getElementById("placeDetail-placeName").innerHTML = placeDetail.name;
document.getElementById("placeDetail-managers").innerHTML = "By <br>&nbsp;&nbsp;&nbsp;&nbsp;" + placeDetail.managers; document.getElementById("placeDetail-managers").innerHTML = "By <br>&nbsp;&nbsp;&nbsp;&nbsp;" + placeDetail.managers;
document.getElementById("placeDetail-description").innerHTML = placeDetail.description; document.getElementById("placeDetail-description").innerHTML = placeDetail.description;