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" + ); }); });