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

G6 v5.0 transform: scale() 导致位置偏移 #5233

Closed
Anye7 opened this issue Dec 6, 2023 · 4 comments
Closed

G6 v5.0 transform: scale() 导致位置偏移 #5233

Anye7 opened this issue Dec 6, 2023 · 4 comments

Comments

@Anye7
Copy link

Anye7 commented Dec 6, 2023

问题描述

scale() 导致定位偏移 在4.x版本可以使用graph.get('canvas').set('supportCSSTransform', true)消除影响 在5.0版本中应该怎么去解决

重现链接

重现步骤

页面使用transform: scale() 导致图渲染位置偏移

预期行为

在排除原页面反缩放等方法外 其他类似G6配置相关的解决方法

平台

  • 操作系统: Windows
  • 网页浏览器: Google Chrome
  • G6 版本: [5.0.0 ]

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

Copy link

github-actions bot commented Dec 6, 2023

hi @Anye7, welcome!

Copy link

github-actions bot commented Dec 6, 2023

Hi @Anye7, Please star this repo if you find it useful! Thanks ⭐!
你好 @Anye7。如果该仓库对你有用,可以 star 一下,感谢你的 ⭐!

@Aarebecca
Copy link
Contributor

你好,请提供更详细的说明及示例

@Aarebecca Aarebecca added the v5 label Dec 8, 2023
@GemT27
Copy link
Contributor

GemT27 commented Dec 13, 2023

graph.canvas.context.config.supportsCSSTransform = true
v5试试这个呢

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

No branches or pull requests

3 participants