FitToView如何控制页面与组件的距离?
How to control the distance between the page and the component with FitToView?
使用FitToView后,页面与组件之间的距离太近了。有什么好的方法可以控制这个距离吗?enter image description here
您可以获得对象(组件)的边界框并使用框缩放 up/down 以制作合适的框并调用 fitBounds
获取边界框:
Forge Viewer API: Bounding box for a specific element
适合范围:
Autodesk forge viewer zooming to bounding box
使用FitToView后,页面与组件之间的距离太近了。有什么好的方法可以控制这个距离吗?enter image description here
您可以获得对象(组件)的边界框并使用框缩放 up/down 以制作合适的框并调用 fitBounds
获取边界框: Forge Viewer API: Bounding box for a specific element
适合范围: Autodesk forge viewer zooming to bounding box