From cdd72c62ca4d22a7505e681c8b97f9a2ec3644dc Mon Sep 17 00:00:00 2001 From: Hakan Seven Date: Thu, 18 Jun 2026 20:45:04 +0300 Subject: [PATCH] =?UTF-8?q?fix(dyn):=20keep=20angle=20input=20box=20clear?= =?UTF-8?q?=20of=20the=20snap=20point=20near=200=C2=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The DYN angle box was placed at full cursor radius along the mid-angle direction. With a near-zero sweep that direction collapses onto the cursor ray, planting the box on top of the cursor / snap point and hiding it. Pull the box back along the ray and offset it to the side opposite the distance box so the snap point stays visible. (#124) Co-Authored-By: Claude Opus 4.8 --- src/ui/overlay.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/src/ui/overlay.rs b/src/ui/overlay.rs index d4f14cff1..a08b2d9ce 100644 --- a/src/ui/overlay.rs +++ b/src/ui/overlay.rs @@ -1475,9 +1475,15 @@ impl DynInputCanvas { let center = match b.role { DynRole::Angle => { let a_mid = a_ref + sweep * 0.5; + // Pull the box back along the ray and lift it to the side + // opposite the distance box. A near-zero sweep collapses the + // mid-angle direction onto the cursor ray, so placing the box + // at full `len` would plant it on the cursor / snap point and + // hide it. (#124) + let r = (len - DYN_BOX_H * 2.0).max(len * 0.5); Point { - x: base.x + a_mid.cos() * len, - y: base.y + a_mid.sin() * len, + x: base.x + a_mid.cos() * r - nx * 18.0, + y: base.y + a_mid.sin() * r - ny * 18.0, } } DynRole::X | DynRole::Width => Point {