mirror of
https://github.com/Azgaar/Fantasy-Map-Generator.git
synced 2025-12-17 01:41:22 +01:00
zone editor - add type check on load
This commit is contained in:
parent
2c269d5d2c
commit
ab5cb82390
1 changed files with 5 additions and 3 deletions
|
|
@ -940,10 +940,12 @@ function parseLoadedData(data) {
|
||||||
if (version < 1.73) {
|
if (version < 1.73) {
|
||||||
// v1.73 moved the hatching patterns out of the user's SVG
|
// v1.73 moved the hatching patterns out of the user's SVG
|
||||||
document.getElementById("hatching")?.remove();
|
document.getElementById("hatching")?.remove();
|
||||||
}
|
|
||||||
|
|
||||||
if (version < 1.731) {
|
// v1.73 added zone type to UI, ensure type is populated
|
||||||
// v1.731 added type to zones
|
const zones = Array.from(document.querySelectorAll("#zones > g"));
|
||||||
|
zones.forEach(zone => {
|
||||||
|
if (!zone.dataset.type) zone.dataset.type = "Unknown";
|
||||||
|
});
|
||||||
}
|
}
|
||||||
})();
|
})();
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue