-
Notifications
You must be signed in to change notification settings - Fork 7
Closed
Description
Currently, the drag behavior in BlockController only affects selected blocks. When a user drags a block, it correctly drags all other selected blocks together, but it ignores other types of selected components (custom Layer components, groups, etc.) that might be selected through the SelectionManager.
Current Implementation
In BlockController.ts (lines 47-49):
graph/packages/graph/src/components/canvas/blocks/controllers/BlockController.ts
Lines 47 to 49 in 1cc4d99
| const draggingElements = block.context.graph.rootStore.blocksList.$selectedBlocks.value.map((block) => | |
| block.getViewComponent() | |
| ); |
Expected Behavior
All selected components should participate in drag operations if they support dragging. The library should:
- Distribute drag events to all selected components - When dragging, all selected components should receive
DRAG_START,DRAG_UPDATE, andDRAG_ENDevents - Support opt-in drag behavior - Components should have a
draggable: booleanproperty to opt into drag support - Provide default drag implementation in GraphComponent - Basic drag logic (with snapping, autopanning, capturing, cursor support) should be available as default behavior in
GraphComponent
Metadata
Metadata
Assignees
Labels
No labels