Editor has no 'snap to angle' for line drawing — user drawing a straight line at exactly 45° or 90° has to estimate the angle, no Shift+drag to constrain to common angles #294
Labels
No labels
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:verify-failed
bug
deferred
feature-request
in-progress
needs-decompose
needs-triage
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/Kimi_Agent_Brother_10_Digitizing_App#294
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Finding
grep -rn 'snap.*angle\|constrainAngle\|constrain.*45' src/components/editor/returns 0. The editor has no angle snap.A user drawing a straight horizontal line:
Most vector editors (Figma, Illustrator, Inkscape) have:
The editor's Draw Path tool doesn't have this.
Where
src/components/editor/EditorCanvas.tsx(the pointer handler whenmode === 'draw_path')grep -rn 'constrainAngle' src/components/editor/returns 0Suggested fix shape
State:
isConstrainingAngle: boolean(true while Shift is held).Logic: in the draw-path pointer handler:
Visual feedback: while Shift is held, show a faint angle indicator (e.g., "45°" near the cursor).
Settings: a "Snap angles to" select in the editor's settings (15°, 30°, 45° increments).
Severity
Low. The user can use the grid (per #288). Power users drawing precise shapes notice.
Discovered by
Gap analysis (2026-10-02) of editor drawing affordances.
Related
SnapSettings) includesnapToGrid; angle snap is the parallel.Shipped fix(#294) at
8735b3aon origin/main.Three changes wire
applySnapinto the Draw-Path tool so users can draw clean-angle segments without computing bearings by hand:EditorCanvas now plumbs
e.shiftKeyintoonCanvasClickfor draw_path clicks (was hardcodedfalse). Shift+pointerdown no longer enters pan mode whenmode === "draw_path"— Shift is reserved for angle snap while drawing.Editor.tsx
handleCanvasClickruns the click throughapplySnap(point, settings, allNodes, undefined, fromPoint)wherefromPointis the last placed node. Angle snap fires when eithersnapSettings.angleSnapStepsis non-empty OR Shift is held. Shift forces a 15° step set ([0,15,30,45,60,75,90,105,120,135,150,165,180]), matching Figma / Illustrator / Inkscape.EditorPositionBar renders an optional
· 45°bearing readout next to the cursor's X/Y when in draw_path mode with at least one anchor node, so the user can see which angle-snap step the next click will lock to. Hidden whenangleDegis null/omitted, so existing callers see no change.Tests: 5 new tests in
src/components/editor/issue-294.test.tsxcovering the canvas plumbing, position-bar rendering, andapplySnapintegration. Full editor suite: 610/610 pass. Pre-existingissue-275failures andissue-240flakiness are unrelated to this fix.Closes #294.