From d299b60874a04fc9ced954589cbf482abf6eeddc Mon Sep 17 00:00:00 2001 From: "Aitor C. Urrutia Aranburu" Date: Sat, 30 Aug 2025 07:52:11 +0200 Subject: [PATCH] feat: mugikorrean irudi estela hobetzen du --- front/src/views/_components/IrudiEstela.astro | 22 ++++++++++--------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/front/src/views/_components/IrudiEstela.astro b/front/src/views/_components/IrudiEstela.astro index 48fc8d6..2987e04 100644 --- a/front/src/views/_components/IrudiEstela.astro +++ b/front/src/views/_components/IrudiEstela.astro @@ -64,21 +64,23 @@ function shuffle(array: T[]) { }); img?.parentElement?.addEventListener("touchstart", () => { - gsap.to(img, { + const tl = gsap.timeline(); + tl.to(img, { scale: 2, opacity: 1, duration: 0.3, ease: "power2.out", }); - }); - - img?.parentElement?.addEventListener("touchend", () => { - gsap.to(img, { - scale: 0, - opacity: 0.4, - duration: 1.6, - ease: "power2.inOut", - }); + tl.to( + img, + { + scale: 0, + opacity: 0, + duration: 0.3, + ease: "power2.out", + }, + "+=0.2" + ); }); });