File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change @@ -31,6 +31,7 @@ import {
3131} from "@monkeytype/contracts/schemas/configs" ;
3232import { convertRemToPixels } from "../utils/numbers" ;
3333import { getActiveFunboxes } from "./funbox/list" ;
34+ import * as TestState from "./test-state" ;
3435
3536async function gethtml2canvas ( ) : Promise < typeof import ( "html2canvas" ) . default > {
3637 return ( await import ( "html2canvas" ) ) . default ;
@@ -469,7 +470,7 @@ export async function updateWordsInputPosition(initial = false): Promise<void> {
469470
470471 if ( Config . tapeMode !== "off" ) {
471472 el . style . top = targetTop + "px" ;
472- el . style . left = activeWord . offsetLeft + "px ";
473+ el . style . left = "50% ";
473474 return ;
474475 }
475476
@@ -938,6 +939,19 @@ export async function updateActiveWordLetters(
938939
939940export function scrollTape ( ) : void {
940941 if ( ActivePage . get ( ) !== "test" || resultVisible ) return ;
942+
943+ if ( ! TestState . isActive ) {
944+ $ ( "#words" )
945+ . stop ( true , false )
946+ . animate (
947+ {
948+ marginLeft : "50%" ,
949+ } ,
950+ SlowTimer . get ( ) ? 0 : 125
951+ ) ;
952+ return ;
953+ }
954+
941955 const wordsWrapperWidth = (
942956 document . querySelector ( "#wordsWrapper" ) as HTMLElement
943957 ) . offsetWidth ;
You can’t perform that action at this time.
0 commit comments