From 12b8b941e3f86e49b07d03f1093b85e5e43ec5ad Mon Sep 17 00:00:00 2001 From: Azgaar Date: Sat, 15 Feb 2025 15:09:39 +0100 Subject: [PATCH] fix: remove old lake paths on drawFeatures, v1.108.2 --- index.html | 2 +- modules/renderers/draw-features.js | 10 ++++++---- versioning.js | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/index.html b/index.html index 460801b8..0702d3fc 100644 --- a/index.html +++ b/index.html @@ -8164,7 +8164,7 @@ - + diff --git a/modules/renderers/draw-features.js b/modules/renderers/draw-features.js index afd26afa..0112a0ae 100644 --- a/modules/renderers/draw-features.js +++ b/modules/renderers/draw-features.js @@ -36,12 +36,14 @@ function drawFeatures() { defs.select("#land").html(html.landMask.join("")); defs.select("#water").html(html.waterMask.join("")); - Object.entries(html.coastline).forEach(([group, paths]) => { - coastline.select("#" + group).html(paths.join("")); + coastline.selectAll("g").each(function () { + const paths = html.coastline[this.id] || []; + d3.select(this).html(paths.join("")); }); - Object.entries(html.lakes).forEach(([group, paths]) => { - lakes.select("#" + group).html(paths.join("")); + lakes.selectAll("g").each(function () { + const paths = html.lakes[this.id] || []; + d3.select(this).html(paths.join("")); }); TIME && console.timeEnd("drawFeatures"); diff --git a/versioning.js b/versioning.js index 4e289fac..cd834d52 100644 --- a/versioning.js +++ b/versioning.js @@ -13,7 +13,7 @@ * Example: 1.102.2 -> Major version 1, Minor version 102, Patch version 2 */ -const VERSION = "1.108.1"; +const VERSION = "1.108.2"; if (parseMapVersion(VERSION) !== VERSION) alert("versioning.js: Invalid format or parsing function"); {