diff --git a/frontend/components/home/Preview.vue b/frontend/components/home/Preview.vue index bdaa9bf..0cb8e17 100644 --- a/frontend/components/home/Preview.vue +++ b/frontend/components/home/Preview.vue @@ -19,7 +19,7 @@ const heymlzElementIsVisible = useElementVisibility(heymlzElement, { rootMargin: "0px 0px -40% 0px", }); -const showHeymlzAnimation = ref(true); +const showHeymlzAnimation = ref(false); const { x: dragAxisX } = useDraggable(draggableEl, { initialValue: { x: 0, y: 0 }, @@ -32,10 +32,12 @@ watch( heymlzElementIsVisible, (newValue) => { if (newValue) { - showHeymlzAnimation.value = true; setTimeout(() => { - showHeymlzAnimation.value = false; - }, 3200); + showHeymlzAnimation.value = true; + setTimeout(() => { + showHeymlzAnimation.value = false; + }, 2900); + }, 400); } }, { @@ -61,9 +63,7 @@ watch( (newValue) => { const clientRect = previewContainerEl.value?.getBoundingClientRect()!; const percent = clientRect.width / 100; - const clipPercent = - (newValue + draggableEl.value!.clientWidth / 2 - clientRect.x - 8) / - percent; + const clipPercent = (newValue + draggableEl.value!.clientWidth / 2 - clientRect.x - 8) / percent; if (clipPercent >= 5 && clipPercent <= 95) { clipPathPercent.value = clipPercent; } @@ -75,12 +75,8 @@ watch(