Skip to content

editor: FIX - door and window placement works in 2D-only view - #1099

Open
ivnnv wants to merge 1 commit into
pascalorg:mainfrom
ivnnv:fix-2d-only-opening-placement
Open

ivnnv wants to merge 1 commit into
pascalorg:mainfrom
ivnnv:fix-2d-only-opening-placement

Conversation

@ivnnv

@ivnnv ivnnv commented Oct 17, 2026 •

Copy link
Copy Markdown
Contributor

What does this PR do?

In 2D-only view the hidden 3D pane had display: none, so its canvas had no size and the scene never mounted, and with it the door and window tools. The 2D plan sends its wall:* events to those tools, so placing a door or window in 2D-only view just showed the cursor chip and the click placed nothing, until 3D was opened at least once. The hidden pane now keeps its size (visibility: hidden, no pointer events, render still paused), so the tools are there from the first hover.

Side effect worth knowing: since the 3D camera now mounts in 2D-only view too, the plan opens aligned to the camera like it already did after visiting 3D once.

How to test

  1. Reload a project with walls straight into 2D-only view (dont open 3D or Split)
  2. Pick Door and hover a wall: the door draws on the wall with its gap and swing
  3. Click: the door is placed where it was drawn. Same for Window

Screenshots / screen recording

Before (fresh 2D-only load, Door on a wall, only the chip):

before

After:

after

Checklist

  • I've tested this locally with bun dev
  • My code follows the existing code style (run bun check to verify)
  • I've updated relevant documentation (if applicable)
  • This PR targets the main branch

Note

Low Risk
Localized layout/CSS change in the editor viewer grid with clear accessibility handling; main tradeoff is slightly more 3D initialization work in 2D-only view while render stays paused.

Overview
Fixes door and window placement in 2D-only view by changing how the always-mounted 3D viewer is hidden when no 3D pane is active.

Instead of display: none (which collapsed the canvas to zero size and prevented the scene and ToolManager from mounting), the hidden 3D pane now uses visibility: hidden with pointer-events: none while still occupying the grid cell, so WebGL context is preserved and placement tools are available for 2D wall:* events from the first load. aria-hidden is set when the 3D pane is not shown.

Side effect: the 3D camera now initializes in 2D-only mode too, so the floor plan opens aligned to the camera without needing to open 3D first. Rendering remains paused via existing renderPaused={!show3d && !showLoader}.

Reviewed by Cursor Bugbot for commit 4d01b57. Bugbot is set up for automated code reviews on this repo. Configure here.

The hidden 3D pane had display none, so its canvas had no size and the scene, with the door and window tools, never mounted until 3D was shown once. The 2D plan sends its wall events to those tools, so placing an opening in 2D-only view showed only the cursor chip and a click placed nothing. The pane now keeps its size while hidden and paused.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant