bitworking / react-scrollmagic

React components for ScrollMagic
https://bitworking.github.io/react-scrollmagic/
372 stars 64 forks source link

Any Example for onEnter trigger hook and pinning? #21

Open rtm619 opened 4 years ago

rtm619 commented 4 years ago

Hi team,

We have an animation where we want to start the animation when the Scene comes into the viewport (onEnter triggerHook). And once the whole scene has covered the viewport fully (i.e top is 0, we want to pin it with position fixed). Currently if we use onEnter triggerHook and pin the Scene, the child div of the Scene gets a top of the viewport height as soon as the animation starts, thus we are unable to see the animation.

If you guys have any examples related to this scenario, please attach the demo in this issue.

Thanks in advance, Reetam

bitworking commented 4 years ago

I don't fully understand the problem. Can you provide a minimal example in https://stackblitz.com/?