mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-18 02:01:22 +01:00
feat: auto-update and restore layers
This commit is contained in:
parent
3925a38de0
commit
aca4f4c5fb
2 changed files with 5 additions and 1 deletions
|
|
@ -950,5 +950,9 @@ export function resolveVersionConflicts(mapVersion) {
|
|||
// v1.104.00 removed some layers from initial render
|
||||
viewbox.select("#armies").style("display", null);
|
||||
viewbox.select("#ice").style("display", null);
|
||||
|
||||
// v1.104.00 added featurePaths to defs
|
||||
const featurePaths = defs.select("#featurePaths");
|
||||
if (!featurePaths.size()) defs.append("g").attr("id", "featurePaths");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -422,7 +422,7 @@ async function parseLoadedData(data, mapVersion) {
|
|||
|
||||
// turn on active layers
|
||||
if (hasChild(texture, "image")) turnOn("toggleTexture");
|
||||
if (hasChildren(terrs)) turnOn("toggleHeight");
|
||||
if (hasChildren(terrs.select("#landHeights"))) turnOn("toggleHeight");
|
||||
if (hasChildren(biomes)) turnOn("toggleBiomes");
|
||||
if (hasChildren(cells)) turnOn("toggleCells");
|
||||
if (hasChildren(gridOverlay)) turnOn("toggleGrid");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue