T. Pex
T. Pex

Reputation: 73

Modify the guiviewer3d-toolbar

I would like hide everything in the toolbar except the measureTools, which I managed to do using visibility: hidden for all of the other tools.

However, the dark background theme is still visible for all three tool-groups (navTools, modelTools, settingsTools).

Everything disappears if I set

.dark-theme{
    visibility: hidden;
{

And if I modify the .dark theme{ background-color: rgba(34,34,34,.0);} it effects the expanded options that shows when the measure tool is clicked.

Any suggestion? Thanks a bunch.

Upvotes: 1

Views: 811

Answers (1)

Jaime Rosales
Jaime Rosales

Reputation: 1288

Why not, better use the Headless viewer and add a Custom button that access the Autodesk.Measure Extension? By a headless viewer you can refer to this sample https://viewer-rocks.autodesk.io/

That one is using custom made extensions that become available when you make the viewer go on full screen mode.

---- EDIT

Is this what you are trying to achieve? Only Measure Tool showing

Here also is how it looks when you try to use it.

If this is what you want, you can try using an extension we have called Control Selector, play with the extension and see how it works. A live link that uses the extension can be found here.

https://viewer-nodejs-tutorial.herokuapp.com/

And here you can find the Code for the extension, just bare in mind that the extensions were written with ES6 sytanx, so it needs transpiling before it can be used.

https://github.com/Autodesk-Forge/library-javascript-viewer-extensions/blob/master/src/Autodesk.ADN.Viewing.Extension.ControlSelector/Autodesk.ADN.Viewing.Extension.ControlSelector.js

Upvotes: 1

Related Questions