Autodesk Forge v7:ES6 中的事件侦听器 类

Autodesk Forge v7: Event Listeners in ES6 Classes

我按照这个tutorial, and I checked the documentation 和onToolCreated 应该与TOOLBAR_CREATED_EVENT 有关。但是其他事件对我不起作用,比如 onExplodeChanged()。我什至检查了控制台,它说 Autodesk.Viewing.EXPLODE_CHANGE_EVENT = "explodeChanged"Autodesk.Viewing.TOOLBAR_CREATED_EVENT = "toolbarCreated"。怎么回事?

不幸的是,onExplodeChangedAutodesk.Viewing.EXPLODE_CHANGE_EVENT 之间不相等。您需要在您的扩展程序中或您自己的应用程序中的某个地方注册 Autodesk.Viewing.EXPLODE_CHANGE_EVENT 的事件处理程序。

Extension#onToolbarCreated is a special cause. It's introduced since Forge Viewer v7. See Migration Guide v6 to v7