mirror of
https://gitee.com/dify_ai/dify.git
synced 2024-12-03 03:38:08 +08:00
fix: workflow auto layout nodes offset & delete node shortcuts (#3484)
This commit is contained in:
parent
459bed9243
commit
d965b91b08
@ -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)
|
||||
|
@ -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 })
|
||||
|
Loading…
Reference in New Issue
Block a user