CLAUDE.md: the pointer-capture / dblclick gotcha
Build image / build-and-push (push) Successful in 9s

Co-Authored-By: Claude Fable 5 <[email protected]>
This commit is contained in:
2026-08-23 03:13:35 -04:00
co-authored by Claude Fable 5
parent 916b2989f5
commit a19fc2e7fc
+6
View File
@@ -104,6 +104,12 @@ Conventions that follow from it:
- **Tap-to-place makes a one-plant plop** (radius = spacing/2, per the handoff);
"Fill the bed" (rows / clumps) is the bulk tool. Fill geometry still follows
the clump rules below — different tools, not a conflict.
- **The canvas captures the pointer, so `onDoubleClick` on a bed never fires.**
`track()` calls `setPointerCapture` on the SVG root for every press, and
capture retargets the compatibility `click`/`dblclick` to the root. Double
presses are detected in `objDown` (same object, < 400 ms, < 12 px) instead;
a `dblclick` handler on an object is dead code — it was, silently, from the
Organic rebuild until 2026-08-23.
- **Undo in the header re-reads history before reverting.** The cached list
trails the canvas right after a placement, and undoing the step *before* the
one you meant is the worst thing an undo button can do. Keep it that way.