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

node和edge双击事件会先触发一次单击事件 #990

Open
shanquanyaoyue opened this issue Jan 12, 2023 · 3 comments
Open

node和edge双击事件会先触发一次单击事件 #990

shanquanyaoyue opened this issue Jan 12, 2023 · 3 comments

Comments

@shanquanyaoyue
Copy link
Contributor

问题描述
请用简洁的语言描述你遇到的bug,至少包括以下部分,如提供截图请尽量完整:

  1. 问题触发的条件 node或edge上进行双击
  2. 期望的表现 触发双击事件
  3. 实际的表现 先触发一次单击事件,再触发一次双击事件
@towersxu
Copy link
Collaborator

towersxu commented Jan 12, 2023

这个需要考虑一下,我们在开发LogicFlow之初就很纠结这个问题。因为浏览器原生的事件双击也会触发单击,所以我们目前是为了保持一致,所以目前所有的双击都出触发单击事件。大家有更好的想法吗?

@towersxu towersxu changed the title [Bug report]node和edge双击事件会先触发一次单击事件 node和edge双击事件会先触发一次单击事件 Jan 13, 2023
@shanquanyaoyue
Copy link
Contributor Author

我的建议是通过debounce设置时间区分双击单击事件,或者通过计数器,统计短时间内触发多少次click再emit事件,后者感觉和前者区别不大

@Oct16th-Lcs
Copy link

这个修复了吗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants