feat(gallery): allow user to interact sooner
This commit is contained in:
@@ -96,6 +96,8 @@ const typeText = (
|
|||||||
const animateIntro = async () => {
|
const animateIntro = async () => {
|
||||||
await nextTick();
|
await nextTick();
|
||||||
|
|
||||||
|
isAnimating.value = true;
|
||||||
|
|
||||||
typeText(backButtonText, BACK_BUTTON, BACK_BUTTON_DURATION, false, {
|
typeText(backButtonText, BACK_BUTTON, BACK_BUTTON_DURATION, false, {
|
||||||
onStart: () => (showBackButtonIcon.value = true),
|
onStart: () => (showBackButtonIcon.value = true),
|
||||||
}).delay(ANIMATION_SLEEP + FADE_IN_DELAY);
|
}).delay(ANIMATION_SLEEP + FADE_IN_DELAY);
|
||||||
@@ -107,7 +109,7 @@ const animateIntro = async () => {
|
|||||||
ANIMATION_SLEEP + FADE_IN_DELAY,
|
ANIMATION_SLEEP + FADE_IN_DELAY,
|
||||||
);
|
);
|
||||||
|
|
||||||
await gsap.fromTo(
|
gsap.fromTo(
|
||||||
".gallery-item",
|
".gallery-item",
|
||||||
{ opacity: 0 },
|
{ opacity: 0 },
|
||||||
{
|
{
|
||||||
@@ -122,8 +124,13 @@ const animateIntro = async () => {
|
|||||||
},
|
},
|
||||||
);
|
);
|
||||||
|
|
||||||
|
setTimeout(
|
||||||
|
() => {
|
||||||
isAnimating.value = false;
|
isAnimating.value = false;
|
||||||
scrollArea.value?.$el.focus();
|
scrollArea.value?.$el.focus();
|
||||||
|
},
|
||||||
|
(ANIMATION_SLEEP + FADE_IN_DURATION) * 1000,
|
||||||
|
);
|
||||||
};
|
};
|
||||||
|
|
||||||
const animateOutro = async () => {
|
const animateOutro = async () => {
|
||||||
|
|||||||
Reference in New Issue
Block a user