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

当鼠标在图标上时 页面无法滚动 #2111

Closed
michael-land opened this issue Mar 2, 2020 · 3 comments · Fixed by #2211
Closed

当鼠标在图标上时 页面无法滚动 #2111

michael-land opened this issue Mar 2, 2020 · 3 comments · Fixed by #2211
Milestone

Comments

@michael-land
Copy link
Contributor

michael-land commented Mar 2, 2020

我最近刚开始用G2, 不确定这个是feature还是bug 当鼠标放在饼图的时候滑动滚轮, 此时无法滚动页面。我尝试搜了issues和docs 似乎并没有发现相关的配置。

可以尝试这个demo https://g2.antv.vision/en/examples/pie/basic 当tooltip显示的时候尝试滑动鼠标

线图也会这样 如果把鼠标放到mark上时 无法滚动页面

  • G2 Version: 4.0
  • Platform: React
  • Mini Showcase(like screenshots): 静图无法表示
  • CodePen Link:
@dxq613
Copy link
Member

dxq613 commented Mar 3, 2020

因为有些交互是滚动鼠标滑轮,缩放图表,还有自定义的滚动条组件。所以在图表上触发 scroll 事件时,preventDefault 了,阻止了滚轮默认的行为。还有右键菜单也阻止了是同样的情况。
这个表现我再想想是否不默认阻止,而让用户自己去阻止默认的行为。

@aqzas
Copy link

aqzas commented Mar 4, 2020

同问,现在的话可以通过哪个配置调节这个行为?

@dxq613
Copy link
Member

dxq613 commented Mar 19, 2020

已经提交了 MR,合并了,下周新版本发布。

@simaQ simaQ added this to the v4.0.3 milestone Mar 19, 2020
@simaQ simaQ closed this as completed Mar 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants