From e09c0e5344d200b1e9561c5794ba759292bc284a Mon Sep 17 00:00:00 2001 From: Azgaar Date: Tue, 13 Aug 2024 16:57:48 +0200 Subject: [PATCH] feat: routes - return old rePacj logic to not break auto-update --- main.js | 13 ++----------- modules/dynamic/auto-update.js | 2 -- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/main.js b/main.js index 34ec1527..12f75328 100644 --- a/main.js +++ b/main.js @@ -1177,17 +1177,8 @@ function reGraph() { const height = gridCells.h[i]; const type = gridCells.t[i]; - // exclude most of ocean points - if (height < 20) { - const isLake = features[gridCells.f[i]].type === "lake"; - if (isLake && type !== -1) continue; - - if (type === 0) continue; - if (type < -4 && !each(24)(i)) continue; - if (type === -4 && !each(12)(i)) continue; - if (type === -3 && !each(6)(i)) continue; - if (type === -2 && !each(3)(i)) continue; - } + if (height < 20 && type !== -1 && type !== -2) continue; // exclude all deep ocean points + if (type === -2 && (i % 4 === 0 || features[gridCells.f[i]].type === "lake")) continue; // exclude non-coastal lake points const [x, y] = points[i]; addNewPoint(i, x, y, height); diff --git a/modules/dynamic/auto-update.js b/modules/dynamic/auto-update.js index 6c4921ff..8de40683 100644 --- a/modules/dynamic/auto-update.js +++ b/modules/dynamic/auto-update.js @@ -898,8 +898,6 @@ export function resolveVersionConflicts(version) { } }); - console.log(pack.routes); - routes.selectAll("path").remove(); if (layerIsOn("toggleRoutes")) drawRoutes(); }