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

centerContent 的效果不是很理想 #2558

Closed
bigbigbo opened this issue Aug 23, 2022 · 3 comments
Closed

centerContent 的效果不是很理想 #2558

bigbigbo opened this issue Aug 23, 2022 · 3 comments
Labels
v2.0 will fix in v2.0

Comments

@bigbigbo
Copy link

bigbigbo commented Aug 23, 2022

问题描述

想通过缩放和平移居中显示画布内容,调用 centerContent api 达不到期望的效果

重现链接

https://codesandbox.io/s/wild-currying-3dpio1?file=/src/App.js

重现步骤

  1. 通过 flex: 1 和 height: 100vh 设置画布大小
  2. 设置 graph 的 autoResize 为 true
  3. 从截图1可以看出demo中画布的大小是正确的,但实际居中效果不理想,截图2是在实际项目中的效果,更不理想
    image
    image

预期行为

期望能最大限度的居中画布内容,如demo中想达到如下效果:
image

平台

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

屏幕截图或视频(可选)

No response

补充说明(可选)

No response

@NewByVector
Copy link
Contributor

这个是 autoResize 的问题,我们会在 2.0 版本中修改该问题。

@NewByVector NewByVector added the v2.0 will fix in v2.0 label Sep 1, 2022
@NewByVector
Copy link
Contributor

autoResize 问题已经在 2.x 版本中修复。

@x6-bot
Copy link
Contributor

x6-bot bot commented Jan 5, 2024

This thread has been automatically locked because it has not had recent activity.

Please open a new issue for related bugs and link to relevant comments in this thread.

@x6-bot x6-bot bot locked as resolved and limited conversation to collaborators Jan 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
v2.0 will fix in v2.0
Projects
None yet
Development

No branches or pull requests

2 participants