affichage popup

This commit is contained in:
Tykayn 2024-11-26 21:38:16 +01:00 committed by tykayn
parent c2cb88e9aa
commit 9f7209e652
2 changed files with 12 additions and 6 deletions

View File

@ -211,7 +211,7 @@ function displayPointsFromApi (points) {
popupContent = '<span class="no-data"> Aucune information renseignée, <a class="edit-button" href="https://www.openstreetmap.org/edit?editor=id&node=' + feature.properties.id + '">ajoutez la dans OpenStreetMap!</a></span>'
}
let html = '<a class="edit-button" href="https://www.openstreetmap.org/edit?editor=id&node=' + feature.properties.id + '">' +
'✏️</a> <span class="color-indication" style="background-color: '+color+';">'+displayOutPowerGuessed+'</span> <br/>' + popupContent
'✏️</a> <span class="color-indication" style="background-color: '+color+';">'+displayOutPowerGuessed+'</span> <br/><span class="popup-content">' + popupContent +'</span>'
// console.log('layer', layer)
let marker = L.marker(layer._latlng, {

View File

@ -176,13 +176,16 @@ a {
}
.leaflet-popup-content {
word-break: break-all;
word-wrap: break-word;
}
.popup-content{
overflow: auto;
min-width: 10rem;
max-width: 20rem;
min-height: 5rem;
max-height: 10rem;
overflow: auto;
word-break: break-all;
word-wrap: break-word;
}
.popup-key {
@ -191,6 +194,7 @@ a {
}
.popup-value{
min-width: 10rem;
max-width: 49%;
text-align: right;
display: inline-block;
}
@ -204,14 +208,16 @@ a {
.color-indication {
min-width: 1rem;
max-width: 5rem;
height: 1rem;
padding: 1rem;
border-radius: 2rem;
display: block;
float: right;
margin: 0.5rem;
position: relative;
top: -2rem;
color: white;
text-shadow: 0 0 0.5rem #222;
clear:right;
}
.no-data {