标签: javascript autodesk-forge autodesk-viewer forge
在forge查看器中,我想从我的脚本中调用焦点方法,以专注于所选元素。
我找不到像
viewer.focuse(viewer.getSelection());
答案 0 :(得分:1)
这很简单,只需拨打Viewer3D#fitToView()〜
Viewer3D#fitToView()
var selection = viewer.getSelection(); viewer.fitToView( selection );
请参阅此处获取文档: https://developer.autodesk.com/en/docs/viewer/v2/reference/javascript/viewer3d/