We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
第一个节点复制以后,再去选中第二个节点复制,就复制不了
————————————2024.12.11 更新—————————————————— 验证了一下,感觉是操作问题,如果没选中节点就复制粘贴的话确实就复制不了了
1.2.28
No response
Chrome
The text was updated successfully, but these errors were encountered:
@boyongjiong 问一下有没有类似 node 的复制方法,背景是我在编排 html 节点的时候里面可以设置全局变量,我想在用户复制的时候把复制 node 的全局变量也复制一份,这个有办法吗,有没有类似 lf.on("node:xxx(复制)", (node) => {}) 的方法
Sorry, something went wrong.
🤔如果想要实现这样的效果,不用加"node:xxx(复制)"事件也能实现吧,因为cloneNode的逻辑其实就是这样
const targetNode = this.getNodeModelById(nodeId) // 根据ID找到对应的nodeModel const data = targetNode?.getData() // 获取节点数据,里面会包括当前节点的id、坐标、文本、properties信息 if (data) { data.x += 30 // 设置新节点的坐标位移以错开两个节点 data.y += 30 data.id = '' if (typeof data.text === 'object' && data.text !== null) { // 如果有文本的话也更新一下文本年代坐标 data.text.x += 30 data.text.y += 30 } const nodeModel = this.addNode(data) // 根据上面的数据创建新节点
所以如果要复制的话可以在执行cloneNode之前把当前节点的数据和全局变量存下来再复制
DymoneLewis
No branches or pull requests
发生了什么?
第一个节点复制以后,再去选中第二个节点复制,就复制不了
————————————2024.12.11 更新——————————————————
验证了一下,感觉是操作问题,如果没选中节点就复制粘贴的话确实就复制不了了
logicflow/core版本
1.2.28
logicflow/extension版本
1.2.28
logicflow/engine版本
No response
浏览器&环境
Chrome
The text was updated successfully, but these errors were encountered: