From f1ee6922b1d506e0d9c5a258292854406b5bec10 Mon Sep 17 00:00:00 2001 From: Pihkaal Date: Wed, 7 Oct 2026 13:58:03 +0200 Subject: [PATCH] fix: hide help buttons on screen too small to click on physical buttons --- app/components/NDS2D.vue | 8 +++----- app/pages/index.vue | 26 +++++++------------------- app/stores/app.ts | 37 +++++++++++++++++++++++++++++++++---- app/stores/intro.ts | 4 +--- 4 files changed, 44 insertions(+), 31 deletions(-) diff --git a/app/components/NDS2D.vue b/app/components/NDS2D.vue index e6c2e88..5c3fd83 100644 --- a/app/components/NDS2D.vue +++ b/app/components/NDS2D.vue @@ -95,11 +95,9 @@ const handleTouchEnd = (event: TouchEvent) => { ); }; -const ndsScale = computed(() => { - const scaleX = (windowSize.width.value - 40) / 235; - const scaleY = (windowSize.height.value - 40) / 431; - return Math.min(scaleX, scaleY); -}); +const ndsScale = computed(() => + getNDS2DScale(windowSize.width.value, windowSize.height.value), +); const gallery = useGalleryStore(); const TOP_SCREEN_OFFSET = 170; diff --git a/app/pages/index.vue b/app/pages/index.vue index 4690711..9a5227b 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -1,5 +1,4 @@