21 Feb 2017

Viewer TIP: Disable Mouse Hover Highlight

Default blog image

I got a question today on how to disable the object mouse hover highlight in the Viewer. I found out about a method that I haven't been able to find in the documentation before, Thank you Jan Liska for the tip.  I decided to write this post for future people can refer to this method. 

The question I got looked like this:

"My industry is in the Mining area. We deal with large topography in 3D.

We would like to disable the highlighting of objects when mouse hovers over them."

If we see the image below we can see the left back tire of the model is highlighted since I have my mouse over that object. 

By adding a simple line to your initialize function of loading the model, it can even be right after the GEOMETRY_LOADED_EVENT 

viewer.impl.disableRollover(true) // will disable hover highlight

viewer.impl.disableRollover(false) // will enable hover highlight default

You will disable this and no more highlight on hover will be display. Use only one at the time.

Thank you for reading, until next time with more tips and tricks with the Forge Viewer.

Related Article