Parcourir la source

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

tags/0.6.3
zxhlyh il y a 1 an
Parent
révision
d965b91b08
Aucun compte lié à l'adresse e-mail de l'auteur
2 fichiers modifiés avec 3 ajouts et 3 suppressions
  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 Voir le fichier

}) })


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

+ 2
- 2
web/app/components/workflow/utils.ts Voir le fichier

dagreGraph.setGraph({ dagreGraph.setGraph({
rankdir: 'LR', rankdir: 'LR',
align: 'UL', align: 'UL',
nodesep: 64,
ranksep: 40,
nodesep: 40,
ranksep: 60,
}) })
nodes.forEach((node) => { nodes.forEach((node) => {
dagreGraph.setNode(node.id, { width: node.width, height: node.height }) dagreGraph.setNode(node.id, { width: node.width, height: node.height })

Chargement…
Annuler
Enregistrer