fix: 🐛 增加剪切快捷键

This commit is contained in:
林熠 2020-05-07 21:52:28 +08:00
parent 3ca6830834
commit a73a82e063

View File

@ -58,14 +58,15 @@ hotkey.bind(['command+c', 'ctrl+c', 'command+x', 'ctrl+x'], (e, action) => {
const data = { type: 'nodeSchema', componentsMap, componentsTree }; const data = { type: 'nodeSchema', componentsMap, componentsTree };
clipboard.setData(data); clipboard.setData(data);
/*
const cutMode = action.indexOf('x') > 0; const cutMode = action.indexOf('x') > 0;
if (cutMode) { if (cutMode) {
const parentNode = selected.getParent(); selected.forEach((node) => {
parentNode.select(); const parentNode = node.getParent();
selected.remove(); parentNode?.select();
node.remove();
});
} }
*/
}); });
// command + v paste // command + v paste