0

I have a case where I need to turn the panning state of the forge viewer on and off manually from a button custom button created outside the viewer. (Basically I need to recreate the functionality of the pan button within the forge viewer). Is this possible?

cpwynn
  • 23
  • 1
  • 7

1 Answers1

0

the navigation state can be switched by the code below:

//get current mode
myviewer.getActiveNavigationTool()
//switch to pan
myviewer.setActiveNavigationTool('pan')

you could simply create your button and trigger the method setActiveNavigationTool when the button is clicked. The choices are: "orbit", "freeorbit", "dolly", "pan","firstperson" etc.

Xiaodong Liang
  • 2,051
  • 2
  • 9
  • 14