From 6956973be174a9a0d680ec4ac7657d84ab72bda7 Mon Sep 17 00:00:00 2001 From: filtered <176114999+webfiltered@users.noreply.github.com> Date: Mon, 16 Dec 2024 05:55:46 +1100 Subject: [PATCH] Fix reroutes ignore change in radius (#379) --- src/LGraph.ts | 4 ++-- src/Reroute.ts | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/LGraph.ts b/src/LGraph.ts index 830c91e..f0a4d32 100644 --- a/src/LGraph.ts +++ b/src/LGraph.ts @@ -1048,9 +1048,9 @@ export class LGraph implements LinkNetwork, Serialisable { */ getRerouteOnPos(x: number, y: number): Reroute | undefined { for (const reroute of this.reroutes.values()) { - const pos = reroute.pos + const { pos } = reroute - if (isSortaInsideOctagon(x - pos[0], y - pos[1], 20)) + if (isSortaInsideOctagon(x - pos[0], y - pos[1], 2 * Reroute.radius)) return reroute } } diff --git a/src/Reroute.ts b/src/Reroute.ts index 0e71aa6..75e5e88 100644 --- a/src/Reroute.ts +++ b/src/Reroute.ts @@ -283,21 +283,21 @@ export class Reroute implements Positionable, LinkSegment, Serialisable