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

x6 2.x版本视口变换的方法zoomToFit不能支持把部分节点缩放到中心;原来1.x版本zoomToRect可以实现;2.x版本这个api找不到了 #4411

Open
zhuqq1 opened this issue Aug 27, 2024 · 1 comment

Comments

@zhuqq1
Copy link

zhuqq1 commented Aug 27, 2024

问题描述

比如画布上有分散开的10个节点;我想把相邻的3个节点缩放到视口中心;找不到对应的api;
zoomToFit方法不能实现;原1.x版本中的zoomToRect可以实现;2.x版本这个api找不到了

我实现思路是先获取这3个节点的BBox
使用这个方法getCellsBBox(cells)得到数据;
然后想用zoomToFit方法把这个参数传入但是没有成功;
1.x版本的zoomToRect方法可以;2.x版本找不到这个方法;是不支持了吗;还是没有放出来;我看源码可以调用

重现链接

重现步骤

预期行为

平台

  • 操作系统: [macOS, Windows, Linux, React Native ...]
  • 网页浏览器: [Google Chrome, Safari, Firefox ...]
  • X6 版本: [2.18.1]

屏幕截图或视频(可选)

企业微信截图_17247610323096

补充说明(可选)

No response

@x6-bot
Copy link
Contributor

x6-bot bot commented Aug 27, 2024

👋 @zhuqq1

Thanks for opening your first issue here! If you're reporting a 🐞 bug, please make sure you include steps to reproduce it.
To help make it easier for us to investigate your issue, please follow the contributing guidelines.
We get a lot of issues on this repo, so please be patient and we will get back to you as soon as we can.

@zhuqq1 zhuqq1 changed the title x6 2.x版本视口变换的方法zoomToFit不能支持把部分节点缩放到中心;原来1.x版本 x6 2.x版本视口变换的方法zoomToFit不能支持把部分节点缩放到中心;原来1.x版本zoomToRect可以实现;2.x版本这个api找不到了 Aug 27, 2024
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

1 participant