简体   繁体   中英

How to change Edit Mode in Autodesk Forge Viewer Markup Extension in Typescript?

I've been trying to implement the Markup Extension in Typescript for Autodesk Forge viewer v6, but it seems like the Typedefinition is missing some of the Namespaces and classes.

I can't use the following line for example:

let shape = new Autodesk.Viewing.Markup.EditModeArrow(this.markup);

It complains that Markup is not defined.

Any ideas?

Unfortunately the markup extension is not yet covered by our official definitions for Viewer - we will endeavor to address that in the upcoming updates...

In the meantime as a workaround try declare Autodesk.Viewing.Markup as any.

And at run-time make sure both the Viewer core libraries as well as the MarkupCore extension is loaded before you call the extension.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM