fix: 禁用ctrl + z

This commit is contained in:
shaohuzhang1 2024-06-28 10:33:10 +08:00
parent cc8d5500aa
commit 53ee5a0a0c

View File

@ -121,10 +121,10 @@ export function initDefaultShortcut(lf: LogicFlow, graph: GraphModel) {
keyboard.on(['cmd + v', 'ctrl + v'], paste_node)
// undo
keyboard.on(['cmd + z', 'ctrl + z'], () => {
if (!keyboardOptions?.enabled) return true
if (graph.textEditElement) return true
lf.undo()
return false
// if (!keyboardOptions?.enabled) return true
// if (graph.textEditElement) return true
// lf.undo()
// return false
})
// redo
keyboard.on(['cmd + y', 'ctrl + y'], () => {