feat(editor): roof/stair/elevator snapping migration + no-angle footprint draft

Migrate roof/stair/elevator draft tools + the 2D floorplan move overlay off the
legacy Shift/Alt=bypass model onto mode-driven snapping (isGridSnapActive /
isMagneticSnapActive); Alt dropped (no validity gate). stair/elevator now use the
live grid step.

These three are placed as footprints, not directional draws, so the angle-lock
mode was meaningless: add NodeDefinition.snapDraftDirectional (default true; false
for roof/stair/elevator) so their draft resolves to the no-angle 'polygon' context
(grid / lines / off). snapContextOf takes an injected draftDirectionalOf, like
profileOf. Add toolHints to stair/elevator so they route through the contextual
HUD and show the snapping chip. Fix one stale Alt-bypass comment in the item
placement coordinator (#9: already force-only). +snapping-mode test.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Wassim SAMAD
2026-06-25 12:23:00 -04:00
co-authored by Claude Opus 4.8
parent 8e9a45a9d5
commit bbf9291c2d
13 changed files with 142 additions and 48 deletions
+3
View File
@@ -94,6 +94,9 @@ const roofHandles: HandleDescriptor<RoofNodeType>[] = [roofMoveHandle()]
export const roofDefinition: NodeDefinition<typeof RoofNode> = {
kind: 'roof',
snapProfile: 'structural',
// Drafted as a 2-corner footprint (axis-aligned bbox), not a directional
// edge → no angle-lock mode (grid / lines / off only).
snapDraftDirectional: false,
schemaVersion: 1,
schema: RoofNode,
category: 'structure',