From 7e416c2b025d568a26878eb53d195733d91b7211 Mon Sep 17 00:00:00 2001 From: Pihkaal Date: Thu, 26 Feb 2026 12:27:54 +0100 Subject: [PATCH] fix(gallery): sometimes, in 2d mode, scale wasn't animated in the transition --- app/components/Gallery/TopScreen/TopScreen.vue | 1 + app/stores/gallery.ts | 6 ++++++ 2 files changed, 7 insertions(+) diff --git a/app/components/Gallery/TopScreen/TopScreen.vue b/app/components/Gallery/TopScreen/TopScreen.vue index 293395b..6c039fd 100644 --- a/app/components/Gallery/TopScreen/TopScreen.vue +++ b/app/components/Gallery/TopScreen/TopScreen.vue @@ -4,6 +4,7 @@ const store = useGalleryStore(); const { assets } = useAssets(); onMounted(() => { + store.cleanup(); if (store.shouldAnimateOutro) { store.shouldAnimateOutro = false; store.animateOutro(); diff --git a/app/stores/gallery.ts b/app/stores/gallery.ts index 5fe0a1c..2781d93 100644 --- a/app/stores/gallery.ts +++ b/app/stores/gallery.ts @@ -40,6 +40,12 @@ export const useGalleryStore = defineStore("gallery", { }), actions: { + cleanup() { + gsap.killTweensOf(this.zoom); + gsap.killTweensOf(this.intro); + gsap.killTweensOf(this.outro); + }, + animateIntro() { this.isIntro = true; this.isOutro = false;