Skip to content

Commit 39245bc

Browse files
committed
fix: scroll animations not working
1 parent 48f2a0c commit 39245bc

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

frontend/src/ts/test/test-ui.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ import * as TimerProgress from "../test/timer-progress";
3737
import * as LiveBurst from "./live-burst";
3838
import * as LiveSpeed from "./live-speed";
3939
import * as Monkey from "./monkey";
40-
import { animate } from "animejs";
4140
import {
4241
blurInputElement,
4342
focusInputElement,
@@ -1098,15 +1097,15 @@ export async function scrollTape(noAnimation = false): Promise<void> {
10981097
PaceCaret.caret.handleTapeScroll(caretScrollOptions);
10991098

11001099
if (Config.smoothLineScroll) {
1101-
animate(wordsEl, {
1100+
wordsEl.animate({
11021101
marginLeft: newMargin,
11031102
duration,
11041103
ease,
11051104
});
11061105

11071106
for (let i = 0; i < afterNewlinesNewMargins.length; i++) {
11081107
const newMargin = afterNewlinesNewMargins[i] ?? 0;
1109-
animate(afterNewLineEls[i] as ElementWithUtils, {
1108+
(afterNewLineEls[i] as ElementWithUtils)?.animate({
11101109
marginLeft: newMargin,
11111110
duration,
11121111
ease,
@@ -1206,7 +1205,7 @@ export async function lineJump(
12061205

12071206
if (Config.smoothLineScroll) {
12081207
lineTransition = true;
1209-
await Misc.promiseAnimate(wordsEl.native, {
1208+
await wordsEl.promiseAnimate({
12101209
marginTop: newMarginTop,
12111210
duration,
12121211
});

0 commit comments

Comments
 (0)