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