Jump to content
Search Community

LimitlessDigital

Members
  • Posts

    20
  • Joined

  • Last visited

Community Answers

  1. LimitlessDigital's post in Nuxt 3 Pagetransition destroys ScrollTrigger. was marked as the answer   
    I fixed it like this: on the mounted check if the transition is completed (on a hard refresh it is always completed) so then run the init timeline. When you switch pages the transitioncomplete toggles from false to true, I've set a watcher to watch this value and then init the timeline on change to true. Do you think this solution is okay @Rodrigo? Seems to work.
     
    watch( () => transitionState.transitionComplete, (state) => { if (state) { initTimeline() } } ) onMounted(() => { if (transitionState.transitionComplete) { initTimeline() } })  
×
×
  • Create New...