antvis/G2

线图为Smooth时,不响应鼠标事件。包括element-active等一些交互都失效了。 #3577

trustao posted onGitHub

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

Edit on CodeSandbox

Steps to reproduce

4.1.8以前版本可以,4.1.8之后都不行

Environment Info
g2 4.1.24
System -
Browser -

期望smooth可以响应element:mouseenter等事件。

<!-- generated by antv-issue-helper. DO NOT REMOVE -->


建议对于需要有交互事件的,可以先不设置 smooth,目前 smooth 的交互事件存在一些性能问题,在新版本中处理。

posted by hustcc over 3 years ago

建议对于需要有交互事件的,可以先不设置 smooth,目前 smooth 的交互事件存在一些性能问题,在新版本中处理。

正常在新建smooth图形的时候,会设置capture为false,但是如果原始为线图,后续将shape修改为smooth,再走update更新,这时smooth线是可以响应交互的 image 这算是一个问题吗?在update的时候只同步了attrs,并没有同步cfg中的capture https://github.com/antvis/G2/blob/f6ce41e90247010ff4ccbd40bbb4bc4d17d8977f/src/geometry/element/index.ts#L97-L123

posted by li1615882553 about 1 year ago

Fund this Issue

$0.00
Funded

Pull requests