diff --git a/src/content/TextAnimations/BlurText/BlurText.vue b/src/content/TextAnimations/BlurText/BlurText.vue index 6017bd1..d21d1b0 100644 --- a/src/content/TextAnimations/BlurText/BlurText.vue +++ b/src/content/TextAnimations/BlurText/BlurText.vue @@ -1,17 +1,42 @@ + + + handleAnimationComplete(index)" + > + {{ segment === ' ' ? '\u00A0' : segment + }}{{ animateBy === 'words' && index < elements.length - 1 ? '\u00A0' : '' }} + + + + - - - - {{ segment === ' ' ? '\u00A0' : segment - }}{{ animateBy === 'words' && index < elements.length - 1 ? '\u00A0' : '' }} - - - +onMounted(() => { + setupObserver(); +}); + +onUnmounted(() => { + observer?.disconnect(); +}); + +watch([() => props.threshold, () => props.rootMargin], () => { + observer?.disconnect(); + setupObserver(); +}); + +watch([() => props.delay, () => props.stepDuration, () => props.animateBy, () => props.direction], () => { + animationKey.value++; + completionFired.value = false; +}); +
+ handleAnimationComplete(index)" + > + {{ segment === ' ' ? '\u00A0' : segment + }}{{ animateBy === 'words' && index < elements.length - 1 ? '\u00A0' : '' }} + +
- - {{ segment === ' ' ? '\u00A0' : segment - }}{{ animateBy === 'words' && index < elements.length - 1 ? '\u00A0' : '' }} - -