From e9f122b1d7c6ffc93b180b90d81621ea36336e0c Mon Sep 17 00:00:00 2001 From: Silvio Tomatis Date: Tue, 2 Jun 2026 06:18:05 +0000 Subject: [PATCH] fix(explain): repaint the original panel during strip drag/reset The drag and reset handlers scheduled only log/bend/exp, but the original panel also consumes panU/panV, so it stayed frozen during a drag and then snapped to the accumulated pan on the next full re-render (source switch or resize). Add 'orig' to both schedule() calls so it follows the others live, matching its stated intent. Fixes #15 Co-Authored-By: Claude Opus 4.8 (1M context) --- src/explain/main.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/explain/main.ts b/src/explain/main.ts index f1619c1..d256989 100644 --- a/src/explain/main.ts +++ b/src/explain/main.ts @@ -409,7 +409,7 @@ async function main(): Promise { state.panV -= (e.clientY - lastY) / perUnit; lastX = e.clientX; lastY = e.clientY; - schedule(['log', 'bend', 'exp']); + schedule(['orig', 'log', 'bend', 'exp']); }); const end = (e: PointerEvent) => { active = false; @@ -426,7 +426,7 @@ async function main(): Promise { byId('exp-reset')?.addEventListener('click', () => { state.panU = 0; state.panV = 0; - schedule(['log', 'bend', 'exp']); + schedule(['orig', 'log', 'bend', 'exp']); }); // ── Boot ─────────────────────────────────────────────────────────────────