mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2026-02-04 17:41:23 +01:00
refactor: simplify ice rendering logic by removing redundant clearing of old SVG
This commit is contained in:
parent
d1e40b6277
commit
3711478d59
1 changed files with 1 additions and 5 deletions
|
|
@ -450,11 +450,7 @@ async function parseLoadedData(data, mapVersion) {
|
|||
if (isVisible(routes) && hasChild(routes, "path")) turnOn("toggleRoutes");
|
||||
if (hasChildren(temperature)) turnOn("toggleTemperature");
|
||||
if (hasChild(population, "line")) turnOn("togglePopulation");
|
||||
if (pack.ice?.glaciers?.length || pack.ice?.icebergs?.length) {
|
||||
ice.selectAll("*").remove(); // clear old SVG
|
||||
drawIce(); // re-render ice from data
|
||||
turnOn("toggleIce");
|
||||
}
|
||||
if (isVisible(ice)) turnOn("toggleIce");
|
||||
if (hasChild(prec, "circle")) turnOn("togglePrecipitation");
|
||||
if (isVisible(emblems) && hasChild(emblems, "use")) turnOn("toggleEmblems");
|
||||
if (isVisible(labels)) turnOn("toggleLabels");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue