From b1120c3bb884ef6bc75f4e4b2c49483d332dc647 Mon Sep 17 00:00:00 2001 From: Michael Moore Date: Mon, 19 Aug 2024 22:40:18 -0500 Subject: [PATCH] fix(map): fix crash processing circular borders --- src/renderer/src/lib/map/data/processCircularGalaxyBorder.ts | 2 +- src/renderer/src/lib/map/data/utils.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/src/lib/map/data/processCircularGalaxyBorder.ts b/src/renderer/src/lib/map/data/processCircularGalaxyBorder.ts index b1bd129..bb7fd0c 100644 --- a/src/renderer/src/lib/map/data/processCircularGalaxyBorder.ts +++ b/src/renderer/src/lib/map/data/processCircularGalaxyBorder.ts @@ -210,7 +210,7 @@ export default function processCircularGalaxyBorders( isMainCluster, }); } - if (minR > CIRCLE_OUTER_PADDING) { + if (minR > CIRCLE_INNER_PADDING * 2) { clusterCircles.push({ cx, cy, diff --git a/src/renderer/src/lib/map/data/utils.ts b/src/renderer/src/lib/map/data/utils.ts index 8946f87..23f503a 100644 --- a/src/renderer/src/lib/map/data/utils.ts +++ b/src/renderer/src/lib/map/data/utils.ts @@ -298,7 +298,7 @@ export function makeBorderCircleGeojson( circle.r / SCALE, { units: 'degrees', - steps: Math.ceil(circle.r), + steps: Math.max(8, Math.ceil(circle.r)), }, );