浏览代码

fix: workflow auto layout nodes offset & delete node shortcuts (#3484)

tags/0.6.3
zxhlyh 1年前
父节点
当前提交
d965b91b08
没有帐户链接到提交者的电子邮件
共有 2 个文件被更改,包括 3 次插入3 次删除
  1. 1
    1
      web/app/components/workflow/index.tsx
  2. 2
    2
      web/app/components/workflow/utils.ts

+ 1
- 1
web/app/components/workflow/index.tsx 查看文件

@@ -138,7 +138,7 @@ const Workflow: FC<WorkflowProps> = memo(({
})

useKeyPress(['delete'], handleEdgeDelete)
useKeyPress(['delete'], handleNodeDeleteSelected)
useKeyPress(['delete', 'backspace'], handleNodeDeleteSelected)
useKeyPress(['ctrl.c', 'meta.c'], handleNodeCopySelected)
useKeyPress(['ctrl.x', 'meta.x'], handleNodeCut)
useKeyPress(['ctrl.v', 'meta.v'], handleNodePaste)

+ 2
- 2
web/app/components/workflow/utils.ts 查看文件

@@ -175,8 +175,8 @@ export const getLayoutByDagre = (originNodes: Node[], originEdges: Edge[]) => {
dagreGraph.setGraph({
rankdir: 'LR',
align: 'UL',
nodesep: 64,
ranksep: 40,
nodesep: 40,
ranksep: 60,
})
nodes.forEach((node) => {
dagreGraph.setNode(node.id, { width: node.width, height: node.height })

正在加载...
取消
保存