mirror of
https://forge.chapril.org/tykayn/libre-charge-map
synced 2025-06-20 01:34:43 +02:00
alertes qualité plus légères
This commit is contained in:
parent
f19bff1953
commit
6248f1ca0b
6 changed files with 63 additions and 27 deletions
|
@ -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());
|
||||
},
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue