Selaa lähdekoodia

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

tags/0.6.3
zxhlyh 1 vuosi sitten
vanhempi
commit
d965b91b08
No account linked to committer's email address
2 muutettua tiedostoa jossa 3 lisäystä ja 3 poistoa
  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 Näytä tiedosto

@@ -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 Näytä tiedosto

@@ -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…
Peruuta
Tallenna