Jump to content
Search Community

Horizontal Scroll prevent and then allow

Mental Republic test
Moderator Tag

Warning: Please note

This thread was started before GSAP 3 was released. Some information, especially the syntax, may be out of date for GSAP 3. Please see the GSAP 3 migration guide and release notes for more information about how to update the code to GSAP 3's syntax. 

Recommended Posts

Hi, i have set up a codepen, we are using both scrollmagic and tweenmax to achieve the following. 

 

There is a line that is drawn while horizontally scrolling, the idea is to prevent the image carousel from moving at the start of the horizontal scroll (only letting the line to be drawn) until the line reaches a point, at that very  same point the line keeps on drawing and we can move the carousel horizontally. 

See the Pen RezvBP by ivanguinea (@ivanguinea) on CodePen

Link to comment
Share on other sites

I'm not sure I follow the question. It kinda sounds like you may want to pin the image carousel until the line gets to it? But I'm really not sure I understand the desired outcome here. Could you be more specific about the desired behavior and how GSAP plays a role in it?

 

Thanks and happy tweening.

:)

 

  • Like 4
Link to comment
Share on other sites

yeah! You pointed me in the right direction, however i still have some issues with the code. 

 

I updated the codepen add add the setpin to the images for period of time:

 

See the Pen RezvBP by ivanguinea (@ivanguinea) on CodePen

The thing now I cannot scroll over the images because they are set as display fixed, so i cannot scroll horizontally over them. Dunno what i am missing here...

Link to comment
Share on other sites

Sorry, I'm still confused about what this should be doing. I'm also not seeing any images. Just a yellow box. 

 

Are the images part of the scroll animation? Or does the line animate to the images and then the user can navigate the images? If the images are not part of the scroll, how does the user control it?

 

 

  • Like 2
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...