Skip to content

Interactive interface for browsing global, full-resolution satellite imagery

Stop looping the animation when the webpage is not visible or in focus

ZachTRice4fc5e3ebb11b
diff --git a/web/js/animation/ui.js b/web/js/animation/ui.js
index 8187a7e74..b94c32f91 100644
--- a/web/js/animation/ui.js
+++ b/web/js/animation/ui.js
@@ -612,6 +612,9 @@ export function animationUi(models, ui) {
uiIndicator.hide(loader);
uiIndicator._hide(loader);
self.animate(index);
+ if (document.hidden) {
+ self.state.playing = false;
+ }
};
/*