Closed mighty-phoenix closed 9 months ago
@mighty-phoenix I'm facing this issue too. did you find a solution? @vasturiano any advice how to prevent this?
@slavanga you can pause rotation of the globe when you detect a loss of focus from the browser tab, using the visibilityChange event.
I presume you are already controlling the rotation of the globe in your app via controls().autoRotate = true
, so this is an extension of that control.
@vasturiano thank you for quick reply. setting autoRotate via the visibilityChange event does not work for me.
here's a reduced example showing the issue: StackBlitz
Hey @vasturiano If I switch to some other tab for a while after opening the globe, and switch back to it, the globe autorotates very quickly for a while. Kindly see screen recording for reference.
https://github.com/vasturiano/globe.gl/assets/32777813/ad1ccbd0-4b57-48ab-b0a5-32c56e2992c1
How can I disable this behaviour and allow the globe to keep autorotating at the same speed as before? Quick help would be highly appreciated. Thanks!