Jump to content
Search Community

Rounded draggable carousel of cards with motionpath

XANDER2 test
Moderator Tag

Go to solution Solved by mvaneijgen,

Recommended Posts

Hello everyone. I want the card with the active class to be centered on top initially. And it is also unclear why draggable does not work properly. It is necessary, if we did not move the circle to the next card, then return it back to the active one, and if we moved the circle a little further and stopped, then move it to the next card and make it active. The wrapper block must not drop the rotate value below 0.

I really need your help, I've been working on this task for a very long time

See the Pen vYbjRMY by xander0000 (@xander0000) on CodePen

Link to comment
Share on other sites

15 hours ago, Rodrigo said:

Hi @XANDER2 and welcome to the GSA Forums!

 

Maybe this demo can help:

 

 

 

Happy Tweening!

This is a cool solution, but it doesn't quite fit. Because rotate can still be less than 0 and more than 360

Link to comment
Share on other sites

  • Solution

I know it sounds boring, but I highly recommend just reading the docs every once in a while definitely when starting a new tool, you'll be surprised how much has already been thought off! Hope it helps and happy tweening! 

 

https://gsap.com/docs/v3/Plugins/Draggable/#bounds

 

See the Pen KKjVoJo?editors=0010 by mvaneijgen (@mvaneijgen) on CodePen

  • Like 1
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...