Palm tests, erase fix, swipe-to-add, size dialog, grid settings, docs #12
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "canvas-polish"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Covers points 4–9 from the recommendations list. One commit per item.
Palm tests for the plus button. The draw-or-navigate choice moved into
touchIntent()inpalm.ts, so tests can check the canvas's actual rule. New tests confirm a finger tap on the plus is accepted after writing and while the pen hovers. It is still rejected while the pen is down, for a palm-sized contact, and within 150 ms of the pen.Cancelled erase is dropped. If the system cancels the pointer mid-drag (
pointercancel), the eraser no longer applies the strokes it touched. Ink strokes already worked this way.Swipe to add. A quick one-finger fling toward a free side of the active page highlights and pulses the plus on that side for 3 s. It only triggers once that edge is on screen. It never adds a page by itself; tapping the highlighted plus does. Fling detection lives in
ink/fling.ts, with tests.Page size dialog.
prompt()is replaced by a dialog with mm fields, preset chips and a swap button. It validates the 50–5000 pt range. Presets and an unchanged size are kept exact rather than rounded to whole mm.Grid settings. Settings → Appearance has a grid on/off toggle and subdivisions: none, 2×2, 4×4, 8×8 or 16×16. Subdivisions are fainter lines inside each page cell and are hidden when they'd be under 8 px apart.
Docs.
spec.md§9 now describes the ink engine and palm rejection as built. The plus buttons, fling, grid and size dialog are documented, sync is marked GitHub-only, and the open items list is now current. The README's page instructions are updated too.Checks.
npm run checkreports 0 errors and 0 warnings.npm testpasses 35 tests.npm run buildsucceeds.Browser smoke test. I ran the built app in headless Chromium with touch emulation:
This is not yet tested on a real tablet.
🤖 Generated with Claude Code
https://claude.ai/code/session_01GaoZtJQZwLXkEgWs8twCia