fix: route back-button and map popup flicker (#1.13.5)

- Replace two fixed-destination back-buttons on the route page with a
  single arrow_back button using window.history.back(), so navigation
  always returns to the calling screen (Messages or Archive).

- Guard setIcon() and setPopupContent() in applyDevice/applyContacts
  behind isPopupOpen() to prevent popup flickering on the 500 ms
  update tick.

- Set fadeAnimation: false and markerZoomAnimation: false on both
  Leaflet map instances (main map and route map) to eliminate popup
  flash on first click, particularly noticeable on Raspberry Pi.
This commit is contained in:
pe1hvh
2026-03-14 05:25:07 +01:00
parent 4227f00e04
commit 71a5ebca74
4 changed files with 35 additions and 11 deletions
+14 -4
View File
@@ -81,6 +81,8 @@
maxZoom: 19,
zoomControl: true,
preferCanvas: true,
fadeAnimation: false,
markerZoomAnimation: false,
});
const state = {
@@ -289,8 +291,11 @@
}
state.deviceMarker.setLatLng(latLng);
state.deviceMarker.setIcon(icon);
state.deviceMarker.setPopupContent(popupHtml);
const devicePopupOpen = state.deviceMarker.isPopupOpen();
if (!devicePopupOpen) {
state.deviceMarker.setIcon(icon);
state.deviceMarker.setPopupContent(popupHtml);
}
state.deviceMarker.options.title = '📡 ' + device.name;
}
@@ -318,8 +323,11 @@
}
existing.setLatLng(latLng);
existing.setIcon(markerIcon);
existing.setPopupContent(popupHtml);
const contactPopupOpen = existing.isPopupOpen();
if (!contactPopupOpen) {
existing.setIcon(markerIcon);
existing.setPopupContent(popupHtml);
}
existing.options.title = markerTitle;
if (!state.layers.contacts.hasLayer(existing)) {
state.layers.contacts.addLayer(existing);
@@ -577,6 +585,8 @@
maxZoom: 19,
zoomControl: true,
preferCanvas: true,
fadeAnimation: false,
markerZoomAnimation: false,
});
host.__meshcoreRouteMap = map;