Window 为不可见的查看器调整大小时出现错误
Errors during Window resize for Viewer that isn't visible
I am hosting an Autodesk Viewer inside a bootstrap div, and find that when the tab is not active, hiding the Viewer, there are errors thrown when the window is调整大小。
我想通过拆除查看器并阻止它在停用选项卡时处理任何调整大小事件来避免这种情况。
有办法吗?
是的,你是对的,根据你的代码将处理程序附加到隐藏的选项卡上,然后执行如下操作:
if (this.viewer) {
if(this.viewer.impl.selector) {
this.viewer.tearDown()
this.viewer.finish()
this.viewer = null
}
}
I am hosting an Autodesk Viewer inside a bootstrap div, and find that when the tab is not active, hiding the Viewer, there are errors thrown when the window is调整大小。
我想通过拆除查看器并阻止它在停用选项卡时处理任何调整大小事件来避免这种情况。
有办法吗?
是的,你是对的,根据你的代码将处理程序附加到隐藏的选项卡上,然后执行如下操作:
if (this.viewer) {
if(this.viewer.impl.selector) {
this.viewer.tearDown()
this.viewer.finish()
this.viewer = null
}
}