mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 09:41:24 +01:00
lock burg - values is boolean, not 1/0
This commit is contained in:
parent
18acadfd80
commit
a55e8d96ff
3 changed files with 8 additions and 8 deletions
|
|
@ -362,7 +362,9 @@ function editBurg(id) {
|
||||||
|
|
||||||
function toggleBurgLockButton() {
|
function toggleBurgLockButton() {
|
||||||
const id = +elSelected.attr("data-id");
|
const id = +elSelected.attr("data-id");
|
||||||
toggleBurgLock(id);
|
const burg = pack.burgs[id];
|
||||||
|
burg.lock = !burg.lock;
|
||||||
|
|
||||||
updateBurgLockIcon();
|
updateBurgLockIcon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -197,8 +197,11 @@ function overviewBurgs() {
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleBurgLockStatus() {
|
function toggleBurgLockStatus() {
|
||||||
const burg = +this.parentNode.dataset.id;
|
const burgId = +this.parentNode.dataset.id;
|
||||||
toggleBurgLock(burg);
|
|
||||||
|
const burg = pack.burgs[burgId];
|
||||||
|
burg.lock = !burg.lock;
|
||||||
|
|
||||||
if (this.classList.contains("icon-lock")) {
|
if (this.classList.contains("icon-lock")) {
|
||||||
this.classList.remove("icon-lock");
|
this.classList.remove("icon-lock");
|
||||||
this.classList.add("icon-lock-open");
|
this.classList.add("icon-lock-open");
|
||||||
|
|
|
||||||
|
|
@ -297,11 +297,6 @@ function getMFCGlink(burg) {
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleBurgLock(burg) {
|
|
||||||
const b = pack.burgs[burg];
|
|
||||||
b.lock = b.lock ? 0 : 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
// draw legend box
|
// draw legend box
|
||||||
function drawLegend(name, data) {
|
function drawLegend(name, data) {
|
||||||
legend.selectAll("*").remove(); // fully redraw every time
|
legend.selectAll("*").remove(); // fully redraw every time
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue