gemercheung 1 rok pred
rodič
commit
8651494658
1 zmenil súbory, kde vykonal 1 pridanie a 1 odobranie
  1. 1 1
      src/utils/canvasPlayer.js

+ 1 - 1
src/utils/canvasPlayer.js

@@ -223,7 +223,7 @@ export class CanvasPlayer extends Mitt {
       );
       const deltaHeight = clip.total * 100 - window.innerHeight;
       const prcess = height / deltaHeight;
-      const frame = Math.floor(clip.total * prcess);
+      const frame = Math.round(clip.total * prcess);
       return clamp(frame, 0, clip.total);
     }
     return 0;