diff --git a/frontend/src/pages/Workflow/Definition/Design/index.tsx b/frontend/src/pages/Workflow/Definition/Design/index.tsx index 7e6e2e2e..e1a31849 100644 --- a/frontend/src/pages/Workflow/Definition/Design/index.tsx +++ b/frontend/src/pages/Workflow/Definition/Design/index.tsx @@ -88,6 +88,14 @@ const WorkflowDesign: React.FC = () => { rubberband: true, movable: true, showNodeSelectionBox: true, + strict: true, + selectCellOnMoved: true, + selectNodeOnMoved: true, + selectEdgeOnMoved: true, + multipleSelectionModifiers: ['ctrl', 'meta'], + showEdgeSelectionBox: true, + showAnchorSelectionBox: true, + pointerEvents: 'auto' }, snapline: true, keyboard: { @@ -120,7 +128,25 @@ const WorkflowDesign: React.FC = () => { }, }); - graph.use(new Selection()); + // 初始化Selection插件 + const selection = new Selection({ + enabled: true, + multiple: true, + rubberband: true, + movable: true, + showNodeSelectionBox: true, + strict: true, + selectCellOnMoved: true, + selectNodeOnMoved: true, + selectEdgeOnMoved: true, + multipleSelectionModifiers: ['ctrl', 'meta'], + showEdgeSelectionBox: true, + showAnchorSelectionBox: true, + pointerEvents: 'auto' + }); + console.log('Initializing Selection plugin:', selection); + graph.use(selection); + graph.use(new MiniMap({ container: minimapContainerRef.current!, width: minimapWidth, @@ -782,18 +808,39 @@ const WorkflowDesign: React.FC = () => { - +