Rectangle drawing tool creates no room #1
Labels
No labels
bug
documentation
enhancement
in-progress
test
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_home_assistant#1
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?
Problem: In
src/components/editor/FloorplanCanvas.tsx, thedraw-rectdrag state setsdragStatebut never computes the final rectangle dimensions or callsonAddRoom. ThehandleMouseUpcallback fordraw-rectis empty and only clears the drag state. The preview path also returnsnull. Consequently, clicking the rectangle tool and dragging on the canvas does not add a new room.Files to modify:
src/components/editor/FloorplanCanvas.tsxAcceptance criteria:
draw-rectmode.{x, y, width, height}snapped to the grid.onAddRoomwith the new rectangle shape.Fixed in
1c0a244. The Rectangle tool now tracks the drag with a live dashed preview and creates the room from the drag rect on mouseup. Verified in the browser: drag (55,25)->(85,75) creates a 30x50 room; the old code only set dragState and never called onAddRoom.