gemercheung 1 anno fa
parent
commit
744eaecae1
1 ha cambiato i file con 16 aggiunte e 17 eliminazioni
  1. 16 17
      src/components/Viewer.jsx

+ 16 - 17
src/components/Viewer.jsx

@@ -235,23 +235,22 @@ class ViewerInner extends Component {
               this.lastProgress = trigger.progress;
             }
           }
-          clearTimeout(timer),
-            (timer = setTimeout(() => {
-              if (
-                this.frame > this.loadedCount &&
-                !this.notLoadedTween.isActive
-              ) {
-                this.props.debug &&
-                  console.warn(this.props.path, "fast forward");
-                this.enterShowElements();
-                this.notLoadedTween = gsap.to(this.processBarRef.current, {
-                  backgroundColor: "#8888a0",
-                  duration: 0.33,
-                  repeat: 1,
-                  yoyo: !0,
-                });
-              }
-            }, 100));
+          clearTimeout(timer);
+          timer = setTimeout(() => {
+            if (
+              this.frame > this.loadedCount &&
+              !this.notLoadedTween.isActive
+            ) {
+              this.props.debug && console.warn(this.props.path, "fast forward");
+              this.enterShowElements();
+              this.notLoadedTween = gsap.to(this.processBarRef.current, {
+                backgroundColor: "#8888a0",
+                duration: 0.33,
+                repeat: 1,
+                yoyo: !0,
+              });
+            }
+          }, 100);
         },
         onScrubComplete: () => {
           this.justScrolled = true;