Typed coordinate entry for item placement (distance-from-wall + offset, AutoCAD-style)
Author: dkbbdevCreated Sep 17, 2026Updated Sep 17, 2026
Context
#308 added typed exact length while drafting walls (merged in #883). The next gap for precise placement: after a wall exists, placing items at exact distances still requires pixel-perfect mousing.
Cabinets already support typed dimensions (W/D/H) via the measurement pills + Tab cycling (#880-adjacent work in packages/nodes/src/cabinet/tool.tsx). What is missing is typed position: an AutoCAD-style two-field dynamic input where you type one axis, Tab to the second axis, then Enter to place.
Proposal
While a placement tool is active and a snap point/reference exists:
- Typing a number opens a two-field inline input (X = distance along reference, Y = offset from it), like AutoCAD's dynamic input.
- Tab toggles focus between fields; the inactive field keeps its live pointer-tracked value.
- Enter commits placement at the typed coordinates.
- Values accept the full
parseMeasurementgrammar (m/cm/mm/ft-in), consistent with #883. - Escape clears the fields first, then cancels the tool (same two-stage pattern as #883).
Implementation notes
- The typed-buffer store from #883 (
packages/editor/src/store/use-wall-draft-typing.ts) is a proven base; generalize it to two fields with an active-field index. - Same parity requirement as #883: 2D floorplan and 3D viewport must both get the behavior in one PR (
wiki/architecture/tools.md). - First candidates: cabinet/window/door placement against a wall.
Out of scope (for the first cut)
- Polar coordinate entry (distance + angle) — could reuse the same store later.
- Absolute X/Y world coordinates — the from-wall reference is what designers expect.
Happy to implement this if maintainers agree on the interaction shape.
Source: pascalorg/editor