Jump to content
Search Community

Draggable cards

knalle test
Moderator Tag

Recommended Posts

Heya! Iiinteresting. It is working but if you show the overflow on the container you'll see all the cards are stacked up on the left.

image.png

The timeline positioning them is at progress(0) and none of the cards have actually been moved to their start position. I've popped 

animation.progress(1).paused(true)

Into the initCells function and it's 'working' now. I'm not certain why this is happening though. Maybe someone else can shed some light on it.

See the Pen oNqzayV?editors=0111 by GreenSock (@GreenSock) on CodePen



 

Link to comment
Share on other sites

That's because you're trying to set progress to a NEGATIVE value (but a valid progress value is between 0 and 1). You can easily just use the gsap.utils.wrap() to correct that. 

 

And it wasn't rendering the cards in their initial positions because your timeline was paused, as Cassie pointed out. 

 

Better?: 

See the Pen OJvRYPe?editors=0010 by GreenSock (@GreenSock) on CodePen

  • Like 2
  • Thanks 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...