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

🐛父元素存在transform,s2设置devicePixelRatio之后,鼠标交互对应不上 #2374

Closed
1 of 5 tasks
wind108369 opened this issue Oct 17, 2023 · 1 comment
Closed
1 of 5 tasks

Comments

@wind108369
Copy link
Contributor

wind108369 commented Oct 17, 2023

🏷 Version

Package Version
@antv/s2 1.51.1
@antv/s2-react 1.44.0

Sheet Type

  • PivotSheet
  • TableSheet
  • GridAnalysisSheet
  • StrategySheet
  • EditableSheet

🖋 Description

因为表格所在的页面存在transform,如果不设置devicePixelRatio,渲染会变得模糊,但是设置之后鼠标交互会对不上

⌨️ Code Snapshots

https://codesandbox.io/s/sleepy-brattain-gp3hzm?file=/index.ts

🔗 Reproduce Link

https://codesandbox.io/s/sleepy-brattain-gp3hzm?file=/index.ts

🤔 Steps to Reproduce

image

此时我的鼠标是放到最后一列的,但是hover是倒数第二列

😊 Expected Behavior

如题

😅 Current Behavior

如题

💻 System information

Environment Info
System
Browser
@lijinke666
Copy link
Member

请多看文档, 避免重复提问

https://s2.antv.antgroup.com/manual/faq#%E7%88%B6%E7%BA%A7%E5%85%83%E7%B4%A0%E4%BD%BF%E7%94%A8%E4%BA%86-transform-scale-%E5%90%8E%E5%9B%BE%E8%A1%A8%E9%BC%A0%E6%A0%87%E5%9D%90%E6%A0%87%E5%93%8D%E5%BA%94%E4%B8%8D%E6%AD%A3%E7%A1%AE

  const s2Options = {
    width: 600,
    height: 480,
    showSeriesNumber: true,
    devicePixelRatio: 1.6,
+   supportCSSTransform: true
  };

image

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

No branches or pull requests

2 participants