From 59462a4f15838ce7c098ce5090505fd4bbd6305c Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sun, 1 Sep 2024 21:42:34 +0200 Subject: [PATCH] fix: #1118 - get lake shoreline if missing --- utils/pathUtils.js | 10 ++++++++-- versioning.js | 2 +- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/utils/pathUtils.js b/utils/pathUtils.js index ff3bbf2a..e148270b 100644 --- a/utils/pathUtils.js +++ b/utils/pathUtils.js @@ -21,7 +21,10 @@ function getVertexPaths({getType, options}) { if (onborderCell === undefined) continue; const feature = pack.features[cells.f[onborderCell]]; - if (feature.type === "lake" && feature.shoreline.every(ofSameType)) continue; // inner lake + if (feature.type === "lake") { + if (!feature.shoreline) Lakes.getShoreline(feature); + if (feature.shoreline.every(ofSameType)) continue; // inner lake + } const startingVertex = cells.v[cellId].find(v => vertices.c[v].some(ofDifferentType)); if (startingVertex === undefined) throw new Error(`Starting vertex for cell ${cellId} is not found`); @@ -104,7 +107,10 @@ function getVertexPath(cellsArray) { if (onborderCell === undefined) continue; const feature = pack.features[cells.f[onborderCell]]; - if (feature.type === "lake" && feature.shoreline.every(ofSameType)) continue; // inner lake + if (feature.type === "lake") { + if (!feature.shoreline) Lakes.getShoreline(feature); + if (feature.shoreline.every(ofSameType)) continue; // inner lake + } const startingVertex = cells.v[cellId].find(v => vertices.c[v].some(ofDifferentType)); if (startingVertex === undefined) throw new Error(`Starting vertex for cell ${cellId} is not found`); diff --git a/versioning.js b/versioning.js index 8a5f9393..403ae70c 100644 --- a/versioning.js +++ b/versioning.js @@ -12,7 +12,7 @@ * * Example: 1.102.0 -> Major version 1, Minor version 102, Patch version 0 */ -const VERSION = "1.101.00"; +const VERSION = "1.101.01"; { document.title += " v" + VERSION;