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 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
f0206dc6eb
commit
6d02ad424e
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user