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

鼠标滚动后,Legend高亮效果依然存在 #3168

Closed
1 task done
Aiyanahy opened this issue Dec 30, 2020 · 3 comments
Closed
1 task done

鼠标滚动后,Legend高亮效果依然存在 #3168

Aiyanahy opened this issue Dec 30, 2020 · 3 comments
Labels

Comments

@Aiyanahy
Copy link

Aiyanahy commented Dec 30, 2020

  • I have searched the issues of this repository and believe that this is not a duplicate.

Reproduction link

https://antv-g2.gitee.io/zh/examples/interaction/component#legend-highlight

Steps to reproduce

1、鼠标悬浮在某个legend上,悬浮效果正常展现;
2、鼠标直接滚动,此时legend悬浮还在,

Environment Info
g2 4.1.1
System -
Browser -

鼠标滚动后按理应该恢复图表默认展示

@hustcc
Copy link
Member

hustcc commented Jan 5, 2021

@Aiyanahy 具体怎么复现? 在什么情况下滚动鼠标?

@hustcc hustcc added the Legend label Jan 5, 2021
@Aiyanahy
Copy link
Author

Aiyanahy commented Jan 5, 2021 via email

@maplor
Copy link
Contributor

maplor commented Jan 8, 2021

我猜是说:
1、鼠标hover到legend上,触发高亮效果
2、此时不移动鼠标,上下滚动。即使滚动后鼠标移出legend,高亮效果和鼠标手型会一直存在。

这个是 interaction 的配置导致的吧,只绑定了 legend-item:mouseleave,没有处理滚动事件。如果对这个很看重,可以覆盖默认的 legend-highlight 这个 interaction,自己加额外的处理逻辑。

@hustcc hustcc closed this as completed Aug 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants