Md. Shohag Mia
Md. Shohag Mia

Reputation: 374

Why updated forge viewer's model browser isolate the items instead of select?

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?

Upvotes: 1

Views: 266

Answers (1)

Takehiro Kato
Takehiro Kato

Reputation: 206

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);

Upvotes: 2

Related Questions