learn.forge.viewhubmodels
learn.forge.viewhubmodels copied to clipboard
viewerable from metadata should be doc.getRoot().findByGuid(viewableId).parent
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