Skip to content
New issue

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

[Bug Report]: groupNode.addChild方法有bug #1577

Open
DonZZZ668 opened this issue Apr 17, 2024 · 1 comment
Open

[Bug Report]: groupNode.addChild方法有bug #1577

DonZZZ668 opened this issue Apr 17, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@DonZZZ668
Copy link

发生了什么?

addNode(groupNode)手动生成一个groupNode,然后通过groupNode.addChild(node.id)将一个节点手动加入,将此节点移出groupNode区域按道理应该这两个节点解除分组关系,但是并没有,还会绑定,除非,手动移动一下node节点才会解除绑定;看了下代码,手动拖入节点到组会触发materials/group/index.js中的appendNodeToGroup方法,此方法会_this.nodeGroupMap.set(data.id,group.id),移出节点出组会触发appendNodeToGroup(),其中会用到nodeGroupMap。但是groupNode.addChild(node.id)并不会修改nodeGroupMap,所以手动将节点加入组,再将节点移出会触发此bug。
解决方案:在手动加入组groupNode.addChild(node.id)后增加一行代码,lf.extension.group.nodeGroupMap.set(node.id,groupNode.id),我们手动加入这个Map即可。

5e4e8afe85d9c737a6382995c520520d.mp4

logicflow/core版本

1.2.18

logicflow/extension版本

1.2.19

logicflow/engine版本

null

浏览器&环境

Chrome

@DonZZZ668 DonZZZ668 added the bug Something isn't working label Apr 17, 2024
@wbccb
Copy link
Contributor

wbccb commented May 15, 2024

#1576

已经修复了吧?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants