TylerBarnes / gatsby-plugin-transition-link

A link component for page transitions in gatsby
537 stars 70 forks source link

Scroll based animation doesn't work when TransitionLink used #180

Open ajayns opened 4 years ago

ajayns commented 4 years ago

In my project I'm using gatsby-plugin-scroll-reveal (https://www.gatsbyjs.org/packages/gatsby-plugin-scroll-reveal/) which leverages another library Sal for intersection-observer triggered animations for elements.

It seems to be working smoothly until I use TransitionLink or AniLink, which leads to the animation never getting triggered itself. Initially I thought it was just the initial viewport screen that's not getting triggered, but it prevents further scroll animations too.

Update: It seems to be an issue with this library in particular, seems to be working fine with manually configured with intersection-observer + animation library such as spring/gsap etc

TheoC0m commented 4 years ago

Hi, I'm facing the exact same issue.

Btw thanks for your awesome work !

laugre commented 4 years ago

Hi ! Same same ! I refered it here https://github.com/solublestudio/gatsby-plugin-scroll-reveal/issues/3 and here (https://github.com/mciastek/sal/issues/43) but no answer for now...

Just for information, gatsby-plugin-scroll-reveal animations are well triggered if I use a classic Gatsby Link, so yes I think it is an issue between gatsby-plugin-scroll-reveal and gatsby-plugin-transition-link...