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

fix(backgroundName): 修复 柱形存在背景时添加 interval:click 触发两次的问题 #3999

Merged
merged 1 commit into from Jun 28, 2022

Conversation

ai-qing-hai
Copy link
Collaborator

image

fixed #3748

@github-actions
Copy link

github-actions bot commented Jun 23, 2022

🎊 PR Preview a6341a0 has been successfully built and deployed to https://antvis-G2-preview-pr-3999.surge.sh?type=diff&date=2022-06-28

🕐 Build time: 70.266s

🤖 By Surge Ui Insight

@hustcc hustcc self-requested a review June 28, 2022 02:21
@hustcc hustcc merged commit a6341a0 into master Jun 28, 2022
@hustcc hustcc deleted the fix-click-background branch June 28, 2022 02:22
@visiky
Copy link
Member

visiky commented Jul 7, 2022

为什么加一个 name 就可以解决了?

@ai-qing-hai
Copy link
Collaborator Author

@visiky registerShape('interval', 'rect') 内置形状有 Group 和 Shape 。 Shape 直接 name 为 'interval'. 使它 在 'interval:click' 中可以点击到。 而 有背景的时候 返回的是 Group , 会在后续的代码中 有 Group.name = ['element', Group.name || 'interval' ] 。导致 Group 和 Shape 都有 了 interval 触发会触发它们两个 也就是 点击触发两次

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

Successfully merging this pull request may close these issues.

带背景柱状图事件被多次触发
3 participants