learn.forge.viewhubmodels icon indicating copy to clipboard operation
learn.forge.viewhubmodels copied to clipboard

viewerable from metadata should be doc.getRoot().findByGuid(viewableId).parent

Open xiaodongliang opened this issue 4 years ago • 1 comments

With guid of metadata, we can find viewerable data by doc.getRoot().findByGuid(viewableId), but the viewerable that can be used with loadDocumentNode is its parent.

so the line below should be fixed to

doc.getRoot().findByGuid(viewableId).parent

https://github.com/Autodesk-Forge/learn.forge.viewhubmodels/blob/master/js/ForgeViewer.js#L39-L42

xiaodongliang avatar Apr 10 '20 03:04 xiaodongliang