Jump to content
GreenSock

Search In
  • More options...
Find results that contain...
Find results in...
TheKiffestOak

Need help with gsap and Angular 8+

Recommended Posts

Im creating a draggable carousel using gsap and Angular and I have two issues. 

 

1. The cells dont render for a portion of the carousel, you need to keep scrolling(dragging) for them to reappear. They dont render initially so you need to scroll(drag) to start seeing them. 

 

2. Snap function does not run at all

 

https://stackblitz.com/edit/angular-apvyyo?file=src/app/carousel/carousel.component.ts

Link to comment
Share on other sites

Welcome to the forums @TheKiffestOak

 

The snap function only works with the InertiaPlugin. See the inertia part of the Draggable docs.

 

For seamless looping, check out our loop Helper Function

 

See the Pen PojYwPp by GreenSock (@GreenSock) on CodePen

 

Another resource worth checking is the article on infinite scrolling. It deals with scrolling, but the same concept applies to dragging.

https://css-tricks.com/going-meta-gsap-the-quest-for-perfect-infinite-scrolling/

 

 

  • 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.
×