feat(network): add align/distribute/group sections to context menu

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
chihlasm
2026-04-13 20:09:32 +00:00
parent bdaea68dd3
commit f90e2c956f
2 changed files with 106 additions and 2 deletions

View File

@@ -736,6 +736,20 @@ function DiagramEditorInner() {
})
}
onClose={closeContextMenu}
onAlignLeft={diagramCommands.alignLeft}
onAlignRight={diagramCommands.alignRight}
onAlignCenterH={diagramCommands.alignCenterH}
onAlignTop={diagramCommands.alignTop}
onAlignBottom={diagramCommands.alignBottom}
onAlignCenterV={diagramCommands.alignCenterV}
onDistributeH={diagramCommands.distributeHorizontally}
onDistributeV={diagramCommands.distributeVertically}
canAlign={contextMenu.type === 'node' ? diagramCommands.canAlign : false}
canDistribute={contextMenu.type === 'node' ? diagramCommands.canDistribute : false}
onGroupSelection={() => {}}
onUngroupSelection={() => {}}
canGroup={false}
canUngroup={false}
/>
)}
{pendingDeleteNodeId && (