From 5e8688d3b640e4425a3b5d9397329357af7c0d3a Mon Sep 17 00:00:00 2001 From: sairaj mote Date: Sat, 17 Apr 2021 17:59:20 +0530 Subject: [PATCH] v0.19.33 Testing different reveal animation in elevator --- js/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/js/index.js b/js/index.js index 1f96468..80f5431 100644 --- a/js/index.js +++ b/js/index.js @@ -678,9 +678,11 @@ const siteMapTimeline = gsap.timeline({ paused: true, }); siteMapTimeline - .from("#elevator_popup", { duration: 0.3, opacity: 0 }) - .from(".floor_list__item", { opacity: 0, scaleY: 0.95, stagger: 0.1 }); + .from("#elevator_popup", { duration: 0.3, opacity: 0, y: 16 }) + .from(".floor_list__item", { opacity: 0, y: 16}); + + function showSiteMap() { document.querySelectorAll(".page").forEach((page) => { page.setAttribute("aria-hidden", "true"); @@ -689,13 +691,13 @@ function showSiteMap() { document.body.style.overflow = "hidden"; document.body.style.top = `-${window.scrollY}px`; getRef("elevator_popup").classList.remove("hide-completely"); - siteMapTimeline.duration(1).play(); + siteMapTimeline.duration(0.6).play(); } function hideSiteMap() { const scrollY = document.body.style.top; window.scrollTo(0, parseInt(scrollY || "0") * -1); - siteMapTimeline.duration(0.4).reverse(); + siteMapTimeline.duration(0.3).reverse(); document.querySelectorAll(".page").forEach((page) => { page.removeAttribute("aria-hidden"); });