1

In the older version(7.1.*) of forge viewer the Model browser select the item and focus the selected item. Older version of forge viewer select the items

But in the latest version(7.*.*) it isolate the item(s). Latest forge viewer isolate the items

Is there any way or settings to get back to the older functionality in the latest version?

Md. Shohag Mia
  • 322
  • 3
  • 13

1 Answers1

2

You can change the behavior by specifying options.docStructureConfig on ModelStructurePanel.

Pls. check below blog post and query on stack overflow which answering for this topics.

https://forge.autodesk.com/blog/customizing-modelstructurepanel-behavior-forge-viewer

Prevent zoom in Forge viewer when clicking in Model Browser

As described in the blog post, you can change the behavior by creating custom ModelStructure Panel on Autodesk.Viewing.OBJECT_TREE_CREATED_EVENT handler or you can specify the option in its constructor.

You also can specify the option in GuiViewer3D constrictor like below.

var options = {
    docStructureConfig: {
        click: {
            onObject: ["selectOnly"] //instead of toggleOverlayedSelection
        },
        clickShift: {
            onObject: ["isolate"] //instead of toggleMultipleOverlayedSelection
        },
        clickCtrl: {
            onObject: ["selectToggle"] //instead of toggleMultipleOverlayedSelection
        }
    }
}
viewer3d = new Autodesk.Viewing.GuiViewer3D(document.getElementById('forgeViewer3d'), options);
Takehiro Kato
  • 206
  • 2
  • 1