mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 18:41:23 +01:00
added icon-dot-circled to locate burg
- icon dot-circled - function zoomIntoBurg()
This commit is contained in:
parent
d42fd5cf92
commit
aa5c48b356
2 changed files with 10 additions and 0 deletions
|
|
@ -47,6 +47,7 @@ function editBurg(id) {
|
|||
byId("burgEmblem").addEventListener("click", openEmblemEdit);
|
||||
byId("burgTogglePreview").addEventListener("click", toggleBurgPreview);
|
||||
byId("burgEditEmblem").addEventListener("click", openEmblemEdit);
|
||||
byId("burgLocate").addEventListener("click", zoomIntoBurg);
|
||||
byId("burgRelocate").addEventListener("click", toggleRelocateBurg);
|
||||
byId("burglLegend").addEventListener("click", editBurgLegend);
|
||||
byId("burgLock").addEventListener("click", toggleBurgLockButton);
|
||||
|
|
@ -397,6 +398,14 @@ function editBurg(id) {
|
|||
byId("burgTogglePreview").className = options.showBurgPreview ? "icon-map" : "icon-map-o";
|
||||
}
|
||||
|
||||
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");
|
||||
zoomTo(x, y, 8, 2000);
|
||||
}
|
||||
|
||||
function toggleRelocateBurg() {
|
||||
const toggler = byId("toggleCells");
|
||||
byId("burgRelocate").classList.toggle("pressed");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue