alertes qualité plus légères

This commit is contained in:
Tykayn 2025-04-28 16:17:13 +02:00 committed by tykayn
parent f19bff1953
commit 6248f1ca0b
6 changed files with 63 additions and 27 deletions

View file

@ -486,7 +486,7 @@ function updateCounters() {
// Modifier bindEventsOnJosmRemote pour cibler les boutons dans un contexte (la popup)
function bindEventsOnJosmRemote(popupElement) {
// Cible tous les liens JOSM à l'intérieur de l'élément popup fourni
$(popupElement).find('.edit-button.josm').each(function () {
$('#current_station_infos').find('.edit-button.josm').each(function () {
// Utiliser .off().on() pour éviter les liaisons multiples si la popup est rouverte
$(this).off('click').on('click', (event) => {
event.preventDefault();
@ -769,7 +769,6 @@ function eachFeature(feature, layer, stats) {
mouseover: function () {
this.openPopup();
bindEventsOnJosmRemote(this.getPopup().getElement());
bindFullDetails(feature);
},
mouseout: function () {
// setTimeout(() => this.closePopup(), 15000);
@ -777,7 +776,6 @@ function eachFeature(feature, layer, stats) {
click: function () {
this.openPopup();
bindEventsOnJosmRemote(this.getPopup().getElement());
bindFullDetails(feature);
},
});
@ -814,10 +812,10 @@ function eachFeature(feature, layer, stats) {
color: 'red',
fillColor: 'orange',
fillOpacity: 0.5,
radius: radius * 1.2
radius: radius * 0.85
});
circle_alert.bindTooltip(badtags, {
permanent: true,
// permanent: true,
direction: 'top'
}).addTo(bad_tags_markers);
}
@ -830,19 +828,18 @@ function eachFeature(feature, layer, stats) {
circle.on({
mouseover: function () {
this.openPopup();
fillDetailsWithFeature(feature);
bindEventsOnJosmRemote(this.getPopup().getElement());
bindFullDetails(feature);
},
mouseout: function () {
// setTimeout(() => this.closePopup(), 15000);
},
click: function () {
this.openPopup();
bindEventsOnJosmRemote(this.getPopup().getElement());
bindFullDetails(feature);
// Remplir automatiquement #current_station_infos lors du clic
fillDetailsWithFeature(feature);
bindEventsOnJosmRemote(this.getPopup().getElement());
},
});