feat(network): add group/ungroup commands with bounding box calculation

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-04-13 20:14:26 +00:00
parent a4512dcf90
commit b7b0d41f92
3 changed files with 73 additions and 5 deletions

View File

@@ -757,10 +757,10 @@ function DiagramEditorInner() {
onDistributeV={diagramCommands.distributeVertically}
canAlign={contextMenu.type === 'node' ? diagramCommands.canAlign : false}
canDistribute={contextMenu.type === 'node' ? diagramCommands.canDistribute : false}
onGroupSelection={() => {}}
onUngroupSelection={() => {}}
canGroup={false}
canUngroup={false}
onGroupSelection={diagramCommands.groupSelection}
onUngroupSelection={diagramCommands.ungroupSelection}
canGroup={contextMenu?.type === 'node' ? diagramCommands.canGroup : false}
canUngroup={contextMenu?.type === 'node' ? diagramCommands.canUngroup : false}
/>
)}
{pendingDeleteNodeId && (