From c8c4c5372013a53d6383b2c9ef8c5bbf2717871e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dominik=20Pal=CC=8Co?= Date: Mon, 5 Oct 2026 21:48:57 +0200 Subject: [PATCH] Fix arc track hit test for arcs crossing 0 degrees When an arc's normalized start angle is greater than its end angle the arc wraps through 0 and covers angles >= start or <= end. The check had the two angles swapped, which is true for every angle, so clicking anywhere on the arc's full circle within the track width selected its net. Co-Authored-By: Claude Opus 5.5 --- InteractiveHtmlBom/web/render.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/InteractiveHtmlBom/web/render.js b/InteractiveHtmlBom/web/render.js index 57ae2c9..dc805da 100644 --- a/InteractiveHtmlBom/web/render.js +++ b/InteractiveHtmlBom/web/render.js @@ -748,7 +748,7 @@ function pointWithinDistanceToArc(x, y, xc, yc, radius, startangle, endangle, d) var angle = modulo(Math.atan2(dy, dx), 2 * Math.PI); if (angle1 > angle2) - return (angle >= angle2 || angle <= angle1); + return (angle >= angle1 || angle <= angle2); else return (angle >= angle1 && angle <= angle2); }