Skip to content

监听复制节点 #1199

Closed Answered by towersxu
paiap asked this question in Q&A
Jun 21, 2023 · 2 comments · 2 replies
Discussion options

You must be logged in to vote

首先看自定义快捷键文档:https://site.logic-flow.cn/docs/#/zh/guide/basic/keyboard
然后把参考内置的自定义功能进行修改。

keyboard.on(['cmd + v', 'ctrl + v'], () => {
if (!keyboardOptions.enabled) return true;
if (graph.textEditElement) return true;
if (selected && (selected.nodes || selected.edges)) {
lf.clearSelectElements();
const addElements = lf.addElements(selected);
if (!addElements) return true;
addElements.nodes.forEach(node => lf.selectElementById(node.id, true));
addElements.edges.forEach(edge => lf.selectElementById(edge.id, true));
selected.nodes.forEach(node => translationNodeData(

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@paiap
Comment options

Comment options

You must be logged in to vote
1 reply
@paiap
Comment options

Answer selected by paiap
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants