fixes anchor popup numbering
This commit is contained in:
@@ -695,7 +695,12 @@
|
|||||||
if (markerIcon) {
|
if (markerIcon) {
|
||||||
const markerText = markerIcon.textContent ?? "0";
|
const markerText = markerIcon.textContent ?? "0";
|
||||||
const markerIndex = parseInt(markerText);
|
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) {
|
if (anchorIndex == 0) {
|
||||||
@@ -787,7 +792,12 @@
|
|||||||
if (markerIcon) {
|
if (markerIcon) {
|
||||||
const markerText = markerIcon.textContent ?? "0";
|
const markerText = markerIcon.textContent ?? "0";
|
||||||
const markerIndex = parseInt(markerText);
|
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];
|
const previousAnchor = anchors[data.segment];
|
||||||
|
|||||||
Reference in New Issue
Block a user