pack.burgs[id] and icons

pack.burgs[id].x and y
icon target and map pin
This commit is contained in:
Ángel Montero Lamas 2024-09-03 20:50:34 +02:00
parent aa5c48b356
commit 2de9d6dea4
2 changed files with 6 additions and 6 deletions

View file

@ -3513,8 +3513,8 @@
<button id="burgEditEmblem" data-tip="Edit emblem" class="icon-shield-alt"></button>
<button id="burgTogglePreview" data-tip="Toggle preview" class="icon-map"></button>
<button id="burgLocate" data-tip="Zoom map and center view in the burg" class="icon-dot-circled"></button>
<button id="burgRelocate" data-tip="Relocate burg" class="icon-target"></button>
<button id="burgLocate" data-tip="Zoom map and center view in the burg" class="icon-target"></button>
<button id="burgRelocate" data-tip="Relocate burg. Click on map to move the burg" class="icon-map-pin"></button>
<button id="burglLegend" data-tip="Edit free text notes (legend) for this burg" class="icon-edit"></button>
<button id="burgLock" class="icon-lock-open" onmouseover="showElementLockTip(event)"></button>
<button

View file

@ -399,10 +399,10 @@ function editBurg(id) {
}
function zoomIntoBurg() {
const id = elSelected.attr("data-id");
const label = document.querySelector("#burgLabels [data-id='" + id + "']");
const x = +label.getAttribute("x");
const y = +label.getAttribute("y");
const id = +elSelected.attr("data-id");
const burg = pack.burgs[id];
const x = burg.x;
const y = burg.y;
zoomTo(x, y, 8, 2000);
}