Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

cell.addTools 函数使用别名并且已存在其他工具的情况下不生效 #4206

Closed
ly326269899 opened this issue Feb 21, 2024 · 3 comments

Comments

@ly326269899
Copy link

Describe the bug

1、给node添加button节点工具,并监听鼠标移入移出事件。
2、鼠标移出时使用 removeTool 方法删除button节点工具
3、通过addTools方法添加节点工具 并传入name属性。此时方法未生效

Your Example Website or App

https://codesandbox.io/p/sandbox/sweet-firefly-g7znyj?file=%2Findex.ts%3A10%2C9

Steps to Reproduce the Bug or Issue

1、给node添加button节点工具,并监听鼠标移入移出事件。
2、鼠标移出时使用 removeTool 方法删除button节点工具
3、通过addTools方法添加节点工具 并传入name属性。此时方法未生效

Expected behavior

已经存在节点工具的情况下能再添加多个使用别名的节点工具

Screenshots or Videos

No response

Platform

Browser: [e.g. Chrome, Safari, Firefox]

Additional context

通过removeTool 函数删除节点工具后。
model/cell.js 中的 addTools 方法里tools对象是一个不为空的对象
image

@x6-bot
Copy link
Contributor

x6-bot bot commented Feb 21, 2024

👋 @ly326269899

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@ly326269899
Copy link
Author

addTools 添加中的Options reset属性可解决该问题

@x6-bot
Copy link
Contributor

x6-bot bot commented Feb 21, 2025

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.

@x6-bot x6-bot bot locked as resolved and limited conversation to collaborators Feb 21, 2025
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant