Closed moranno closed 3 years ago
myGlobe.controls().autoRotate = false; // or true
So you just need to associate that action to your click event.
Additionally, if you just want to cancel the auto-rotation when the user manually zooms/pans the globe, you can do this:
// assuming auto-rotation has been previously engaged
const controls = myGlobe.controls();
controls.addEventListener('start', () => controls.autoRotate = false);
Thank You!
I just find a example here: https://github.com/vasturiano/react-globe.gl/issues/55#issuecomment-847450561 But it doesn't work in this version.
1.How do I write code to stop/resume autoRotate when mouse click? 2.Which version should I use? Ract ver or this ver? for performance wise?
Thanks for the great work!