From 6d02ad424e3290532f29ad74de4de0b77a63ddc0 Mon Sep 17 00:00:00 2001 From: Wassim SAMAD Date: Fri, 26 Jun 2026 09:59:05 -0400 Subject: [PATCH] docs(editor): correct stale Alt "free place" comment in placement coordinator The floor grab-offset comment claimed floorStrategy.move reads localPosition "under Alt (free place)"; it reads event.position with mode-governed snapToGrid and has no Alt branch (Alt is force-place-only). Describe the real reason both frames carry the offset: it's computed local-space but the strategy consumes the world point. Co-Authored-By: Claude Opus 4.8 --- .../components/tools/item/use-placement-coordinator.tsx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/editor/src/components/tools/item/use-placement-coordinator.tsx b/packages/editor/src/components/tools/item/use-placement-coordinator.tsx index cdc502f2..83ddcfad 100644 --- a/packages/editor/src/components/tools/item/use-placement-coordinator.tsx +++ b/packages/editor/src/components/tools/item/use-placement-coordinator.tsx @@ -610,10 +610,10 @@ export function usePlacementCoordinator(config: PlacementCoordinatorConfig): Rea } // Floor grab-offset: the item tracks the grabbed point instead of snapping - // its origin under the cursor. `floorStrategy.move` snaps on the WORLD grid - // (`event.position`) on its default path and only reads `event.localPosition` - // under Alt (free place), so both frames must carry the offset; the world - // point is derived from the corrected local one so the two stay consistent. + // its origin under the cursor. The offset is computed in building-local space + // (`event.localPosition`), but `floorStrategy.move` snaps on the WORLD grid + // (`event.position`), so the corrected local point is re-projected to a + // corrected world point and both frames carry the offset to stay consistent. const applyFloorGrabOffset = (event: GridEvent): GridEvent => { if (relativeFloorStart === null) return event const rawX = event.localPosition[0]