diff --git a/src/content/TextAnimations/TrueFocus/TrueFocus.vue b/src/content/TextAnimations/TrueFocus/TrueFocus.vue index 46e737f..d7bfa70 100644 --- a/src/content/TextAnimations/TrueFocus/TrueFocus.vue +++ b/src/content/TextAnimations/TrueFocus/TrueFocus.vue @@ -12,6 +12,7 @@ interface TrueFocusProps { pauseBetweenAnimations?: number; index?: Array; syncGroup?: string; + defaultBlur?: boolean; } const props = withDefaults(defineProps(), { @@ -21,7 +22,8 @@ const props = withDefaults(defineProps(), { borderColor: 'green', glowColor: 'rgba(0, 255, 0, 0.6)', animationDuration: 0.5, - pauseBetweenAnimations: 1 + pauseBetweenAnimations: 1, + defaultBlur: true }); const words = computed(() => props.sentence.split(' ')); @@ -72,7 +74,11 @@ const handleMouseEnter = (index: number) => { const handleMouseLeave = () => { if (props.manualMode) { - currentIndex.value = lastActiveIndex.value || 0; + if (props.defaultBlur) { + currentIndex.value = lastActiveIndex.value || 0; + return; + } + currentIndex.value = -1; } }; @@ -128,6 +134,7 @@ onUnmounted(() => { if (props.syncGroup) unregisterSyncGroup(props.syncGroup); }); +