From 1bd42742f410dc33baa829880091dd793a1dece1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cchrisshank=E2=80=9D?= Date: Wed, 11 Sep 2024 11:05:32 -0700 Subject: [PATCH] nitpicks --- src/music/record-player.ts | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/music/record-player.ts b/src/music/record-player.ts index 15348b8..d6fcbba 100644 --- a/src/music/record-player.ts +++ b/src/music/record-player.ts @@ -280,6 +280,7 @@ export class RecordPlayer extends HTMLElement { if (this.paused) return; const arm = this.shadowRoot!.querySelector('.tone-arm') as HTMLElement; + const animation = arm.getAnimations()[0]; if (animation) { @@ -289,13 +290,11 @@ export class RecordPlayer extends HTMLElement { arm.style.rotate = ''; arm.animate( [ - { rotate }, - { rotate, transform: 'rotateX(20deg)', offset: 0.2 }, - { transform: 'rotateX(20deg)', offset: 0.8 }, + { offset: 0, rotate }, + { offset: 0.2, rotate, transform: 'rotateX(20deg)' }, + { offset: 0.8, transform: 'rotateX(20deg)' }, ], - { - duration: 3000, - } + { duration: 3000 } ); }