Register 'shelf' in selection managers (5 arrays + 1 type union)
Shelf renderer was emitting `shelf:click` / `shelf:enter` / `shelf:leave` via useNodeEvents from the previous commit, but no listener subscribed — the SelectionManager components (one in editor, one in viewer) each maintain hardcoded allTypes arrays that didn't include 'shelf'. Adds 'shelf' to: - editor/selection-manager: 5 allTypes arrays (one per selection strategy — structure, structure-hover, furnish, site, deselect-also-listens-to). - viewer/selection-manager: the SelectableNodeType union + allTypes array. Shelves can now be clicked / hovered in the 3D canvas and the selection state updates correctly. The hardcoded arrays are exactly the kind of cross-cutting friction the registry is supposed to eliminate. Phase 4 should derive these lists from `nodeRegistry.entries().filter(d => d.capabilities.selectable)` so adding a new kind doesn't require editing two files. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.7
parent
d17e083c77
commit
857ddd4d95
@@ -576,6 +576,7 @@ const SELECTION_STRATEGIES: Record<string, SelectionStrategy> = {
|
||||
'roof-segment',
|
||||
'stair',
|
||||
'stair-segment',
|
||||
'shelf',
|
||||
'spawn',
|
||||
'window',
|
||||
'door',
|
||||
@@ -1012,6 +1013,7 @@ export const SelectionManager = () => {
|
||||
'roof-segment',
|
||||
'stair',
|
||||
'stair-segment',
|
||||
'shelf',
|
||||
'window',
|
||||
'door',
|
||||
'zone',
|
||||
@@ -1183,6 +1185,7 @@ export const SelectionManager = () => {
|
||||
'roof-segment',
|
||||
'stair',
|
||||
'stair-segment',
|
||||
'shelf',
|
||||
'spawn',
|
||||
'window',
|
||||
'door',
|
||||
@@ -1334,6 +1337,7 @@ export const SelectionManager = () => {
|
||||
'roof-segment',
|
||||
'stair',
|
||||
'stair-segment',
|
||||
'shelf',
|
||||
'spawn',
|
||||
'window',
|
||||
'door',
|
||||
@@ -1408,6 +1412,7 @@ export const SelectionManager = () => {
|
||||
'roof-segment',
|
||||
'stair',
|
||||
'stair-segment',
|
||||
'shelf',
|
||||
'spawn',
|
||||
'window',
|
||||
'door',
|
||||
|
||||
@@ -35,6 +35,7 @@ type SelectableNodeType =
|
||||
| 'door'
|
||||
| 'column'
|
||||
| 'item'
|
||||
| 'shelf'
|
||||
| 'slab'
|
||||
| 'ceiling'
|
||||
| 'roof'
|
||||
@@ -338,6 +339,7 @@ export const SelectionManager = () => {
|
||||
'fence',
|
||||
'item',
|
||||
'column',
|
||||
'shelf',
|
||||
'slab',
|
||||
'ceiling',
|
||||
'roof',
|
||||
|
||||
Reference in New Issue
Block a user