fixes anchor popup numbering

This commit is contained in:
Christian Beutel
2025-03-22 14:05:43 +01:00
parent 4e5c900ed9
commit 98691dc311

View File

@@ -695,7 +695,12 @@
if (markerIcon) {
const markerText = markerIcon.textContent ?? "0";
const markerIndex = parseInt(markerText);
markerIcon.textContent = markerIndex - 1 + "";
const newIndex = markerIndex - 1;
markerIcon.textContent = newIndex + "";
anchor
.marker!.getPopup()
._content.getElementsByTagName("h5")[0].textContent =
$_("route-point") + " #" + newIndex;
}
}
if (anchorIndex == 0) {
@@ -787,7 +792,12 @@
if (markerIcon) {
const markerText = markerIcon.textContent ?? "0";
const markerIndex = parseInt(markerText);
markerIcon.textContent = markerIndex + 1 + "";
const newIndex = markerIndex + 1;
markerIcon.textContent = newIndex + "";
anchor
.marker!.getPopup()
._content.getElementsByTagName("h5")[0].textContent =
$_("route-point") + " #" + newIndex;
}
}
const previousAnchor = anchors[data.segment];