mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-12-31 12:28:50 +08:00
fix: background loader not showing
This commit is contained in:
parent
95bd39a20e
commit
d43fcba221
1 changed files with 3 additions and 3 deletions
|
|
@ -1,4 +1,4 @@
|
|||
import { animate, JSAnimation } from "animejs";
|
||||
import { JSAnimation } from "animejs";
|
||||
import { requestDebouncedAnimationFrame } from "../utils/debounced-animation-frame";
|
||||
import { qsr } from "../utils/dom";
|
||||
|
||||
|
|
@ -7,7 +7,7 @@ let showAnim: JSAnimation | null = null;
|
|||
|
||||
export function show(instant = false): void {
|
||||
requestDebouncedAnimationFrame("loader.show", () => {
|
||||
showAnim = animate(element, {
|
||||
showAnim = element.animate({
|
||||
opacity: 1,
|
||||
duration: 125,
|
||||
delay: instant ? 0 : 125,
|
||||
|
|
@ -21,7 +21,7 @@ export function show(instant = false): void {
|
|||
export function hide(): void {
|
||||
requestDebouncedAnimationFrame("loader.hide", () => {
|
||||
showAnim?.pause();
|
||||
animate(element, {
|
||||
element.animate({
|
||||
opacity: 0,
|
||||
duration: 125,
|
||||
onComplete: () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue