【问题标题】:How to control the distance between the page and the component with FitToView?FitToView如何控制页面与组件的距离?
【发布时间】:2021-01-26 13:25:22
【问题描述】:

使用FitToView后,页面与组件的距离太近了。有什么好的方法可以控制这个距离吗?enter image description here

【问题讨论】:

    标签: autodesk-forge


    【解决方案1】:

    您可以获取对象(组件)的边界框并使用框放大/缩小以制作合适的框并调用 fitBounds

    获取边界框: Forge Viewer API: Bounding box for a specific element

    fitBounds: Autodesk forge viewer zooming to bounding box

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2023-03-31
      • 2017-04-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多