Kaynağa Gözat

fix: workflow delete edge (#3541)

tags/0.6.4
zxhlyh 1 yıl önce
ebeveyn
işleme
2e27425e93
No account linked to committer's email address

+ 6
- 0
web/app/components/workflow/hooks/use-nodes-interactions.ts Dosyayı Görüntüle

@@ -820,8 +820,14 @@ export const useNodesInteractions = () => {

const {
getNodes,
edges,
} = store.getState()

const currentEdgeIndex = edges.findIndex(edge => edge.selected)

if (currentEdgeIndex > -1)
return

const nodes = getNodes()
const nodesToDelete = nodes.filter(node => node.data.selected)


+ 1
- 1
web/app/components/workflow/index.tsx Dosyayı Görüntüle

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

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

Loading…
İptal
Kaydet