Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

feat: add delete functionality for walls, slabs and other structural elements#193

Open
hellozzm wants to merge 1 commit into
pascalorg:main from
hellozzm:fix/issue-156
Open

feat: add delete functionality for walls, slabs and other structural elements #193
hellozzm wants to merge 1 commit into
pascalorg:main from
hellozzm:fix/issue-156

Conversation

@hellozzm

@hellozzm hellozzm commented Mar 28, 2026

Copy link
Copy Markdown

Summary

Add ability to delete structural elements (walls, slabs, ceilings, doors, windows, items, zones, roofs) when the editor is in delete mode (shortcut: D).

The delete mode button already existed in the UI toolbar but had no handler — clicking on elements did nothing.

Changes

  • New DeleteTool component (packages/editor/src/components/tools/delete-tool.tsx)

    • Listens to click events on all deletable node types via the event bus
    • Validates the clicked node belongs to the current level/zone selection
    • Calls useScene.deleteNode() to remove the node
    • Plays appropriate SFX (item-delete or structure-delete)
  • Updated ToolManager to render DeleteTool when mode is delete

Testing

  1. Open the editor and switch to Structure phase
  2. Click the Delete mode button (trash icon) or press D
  3. Click on a wall, slab, or other structural element → it should be deleted
  4. Verify undo (Ctrl+Z) restores the deleted element
  5. Verify delete only works on elements in the selected level/zone

Fixes #156

Add DeleteTool component that activates when the editor is in 'delete'
mode (shortcut: D). Clicking on any structural element (wall, slab,
ceiling, door, window, item, zone, roof) removes it from the scene.
- New DeleteTool component with click handlers via event bus
- Validates clicked node belongs to a deletable type
- Integrates with existing tool-manager and building-local group
- Resolves conflicts with upstream's building transform refactor
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

No way to delete structures? (walls, slabs?)

1 participant

AltStyle によって変換されたページ (->オリジナル) /