mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-19 10:31:24 +01:00
feat: zones - restore layer
This commit is contained in:
parent
5b5ea664d4
commit
76843464de
2 changed files with 2 additions and 2 deletions
3
main.js
3
main.js
|
|
@ -1535,8 +1535,7 @@ function undraw() {
|
||||||
viewbox
|
viewbox
|
||||||
.selectAll("path, circle, polygon, line, text, use, #texture > image, #zones > g, #armies > g, #ruler > g")
|
.selectAll("path, circle, polygon, line, text, use, #texture > image, #zones > g, #armies > g, #ruler > g")
|
||||||
.remove();
|
.remove();
|
||||||
document
|
byId("deftemp")
|
||||||
.getElementById("deftemp")
|
|
||||||
.querySelectorAll("path, clipPath, svg")
|
.querySelectorAll("path, clipPath, svg")
|
||||||
.forEach(el => el.remove());
|
.forEach(el => el.remove());
|
||||||
byId("coas").innerHTML = ""; // remove auto-generated emblems
|
byId("coas").innerHTML = ""; // remove auto-generated emblems
|
||||||
|
|
|
||||||
|
|
@ -181,6 +181,7 @@ function restoreLayers() {
|
||||||
if (layerIsOn("toggleIce")) drawIce();
|
if (layerIsOn("toggleIce")) drawIce();
|
||||||
if (layerIsOn("toggleEmblems")) drawEmblems();
|
if (layerIsOn("toggleEmblems")) drawEmblems();
|
||||||
if (layerIsOn("toggleMarkers")) drawMarkers();
|
if (layerIsOn("toggleMarkers")) drawMarkers();
|
||||||
|
if (layerIsOn("toggleZones")) drawZones();
|
||||||
|
|
||||||
// some layers are rendered each time, remove them if they are not on
|
// some layers are rendered each time, remove them if they are not on
|
||||||
if (!layerIsOn("toggleBorders")) borders.selectAll("path").remove();
|
if (!layerIsOn("toggleBorders")) borders.selectAll("path").remove();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue