Skip to content

Commit

Permalink
fix: workflow auto layout nodes offset & delete node shortcuts (#3484)
Browse files Browse the repository at this point in the history
  • Loading branch information
zxhlyh authored Apr 15, 2024
1 parent 459bed9 commit d965b91
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion web/app/components/workflow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
4 changes: 2 additions & 2 deletions web/app/components/workflow/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down

0 comments on commit d965b91

Please sign in to comment.