From 2cf841901ab918beff3509ade34f7a4b5491c63b Mon Sep 17 00:00:00 2001 From: Dallas Hart <36043275+Nomalah@users.noreply.github.com> Date: Tue, 1 Aug 2023 09:34:29 -0400 Subject: [PATCH 1/7] style: eslint --- package.json | 2 +- src/components/SongContainer.vue | 19 ++++++++----------- src/scripts/migrate.ts | 2 +- src/views/TopicalIndexView.vue | 3 +-- 4 files changed, 11 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index 06f3f502..0dca28d0 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "acchymnal", - "version": "2.0.2", + "version": "2.0.3", "private": true, "scripts": { "postinstall": "patch-package", diff --git a/src/components/SongContainer.vue b/src/components/SongContainer.vue index 81a49cb7..6efa8014 100644 --- a/src/components/SongContainer.vue +++ b/src/components/SongContainer.vue @@ -61,14 +61,14 @@ onMounted(async () => { boundsPadding: isMobile ? 1 : 0.5, }); } - if(isMobile) { + if (isMobile) { setInterval(() => { observer.refresh(); }, 10); } }); -class IntersectionObserverManager { +class IntersectionObserverManager { _observer; _observedNodes; @@ -96,15 +96,14 @@ class IntersectionObserverManager { } } -const observer = new IntersectionObserverManager(new IntersectionObserver((entries, _observer) => - { +const observer = new IntersectionObserverManager( + new IntersectionObserver( + (entries, _observer) => { for (const entry of entries) { let rootRect = entry.boundingClientRect; let visibleRect = entry.intersectionRect; - if(visibleRect.height < rootRect.height) - panzoom.setVerticalPan(true); - else - panzoom.setVerticalPan(false); + if (visibleRect.height < rootRect.height) panzoom.setVerticalPan(true); + else panzoom.setVerticalPan(false); } }, { @@ -116,10 +115,8 @@ const observer = new IntersectionObserverManager(new IntersectionObserver((entri ); onUpdated(async () => { - if(isMobile) - observer.observe(panzoom_container.value as Element); + if (isMobile) observer.observe(panzoom_container.value as Element); }); -