feat: refine node deletion logic to protect only start nodes

This commit is contained in:
mlogclub
2026-06-28 21:24:54 +08:00
parent c7555d67c5
commit 77dda5fd9c
6 changed files with 13 additions and 7 deletions
@@ -64,7 +64,7 @@ export function useFlowgramEditorProps({
},
canDeleteNode: (_ctx, node) => {
const type = String(node.flowNodeType ?? "")
return type !== "start" && type !== "end"
return type !== "start"
},
canDeleteLine: () => !readonly,
onContentChange: (ctx) => {