Completely unload and reload forge viewer

后端 未结 1 1131
迷失自我
迷失自我 2021-01-15 05:02

I\'m using the Forge Viewer on an Angular 5 application.

Is there a way to completely unload the viewer so it can later be reloaded?

I have the following cod

相关标签:
1条回答
  • 2021-01-15 05:37

    The static method Autodesk.Viewing.Initializer can only be called once the subsequent times it will not return. All other viewer methods need to be invoked every time your component loads. So you need to refactor your code a bit.

    My app is using React and I save a boolean in the appState to avoid calling that Initializer twice if it has been initialized already.

    Hope that helps

    0 讨论(0)
提交回复
热议问题