Jump to content
Search Community

How to reconcile stagger animation with Finsweet CMS Filter?

bro-design

Recommended Posts

Posted

Hi GSAP Community!?

My name is Dmitrii, I'm Webflow developer and now I start to use GSAP in my projects)

In this project I use ScrollTrigger+ScrollSmoother. All works perfect but I stuck with development when tried to use GSAP + Finsweet CMS Filter.

The problem is that when I try to filter the cards — cards is filtered, but GSAP stagger animation works not correct. 

Here's a video▶️  with explanation of the problem. 

In ideal way to fixing this issue is when user click on filter button — "reset" the cards stagger animation.

How you suggest to do that? Thanks)
 

See the Pen MWdMzmb by brodesign (@brodesign) on CodePen.

Posted

Hi there, thanks for the video and demo!

 

You may be looking for ScrollTrigger.refresh() ?

https://gsap.com/docs/v3/Plugins/ScrollTrigger/refresh()/

If this isn't the solution, would you mind simplifying down your demo to *just* the basics. We just need to see the code that is causing the issue, please don't include your whole project and all the related JS and CSS. Just some colored <div> elements and the GSAP code is best. See if you can recreate the issue with as few dependencies as possible.

Thanks so much.

  • 4 months later...
Posted

I can take another look at this demo for you, maybe I can simplify it down.

Posted

Nope, there's no way I can get into how the finsweet filter works I'm afraid. That's all minified code.

You'd basically need to do something like this

 

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

 

When the user clicks on a different category, kill the batch and then create a new one.

  • Like 1
  • 1 year later...
theraseus
Posted

Hi @Cassie

I am running into a similar issue now using webflow native gsap animations with a CMS list filtered with finsweet.  do you think the same method of killing the batch and recreating it could work? or the fact that the objects are created using the CMS might generate conflicts? 

Thanks

Rodrigo
Posted

Hi @theraseus,

 

I'm not at all familiar with finsweet, but is there any API that exposes a callback or callbacks system when filtering is completed and the list is updated? That would be my first attempt to solve this.

 

The approach of killing the instances should work as expected, there shouldn't be any issues there. Another alternative to that demo is to use GSAP Context:

https://gsap.com/docs/v3/GSAP/gsap.context()

 

Here is a demo using it:

See the Pen ByLVpEW by GreenSock (@GreenSock) on CodePen.

1 hour ago, theraseus said:

or the fact that the objects are created using the CMS might generate conflicts? 

There shouldn't be an issue with that, since at the elements are in the DOM, so basically, regardless of how, these are DOM elements and therefore once they are in the DOM they can be animated with GSAP.

 

Hopefully this clear things up

Happy Tweening!

theraseus
Posted

thanks @Rodrigo i will look into both options and come back if any route works for future reference. Thanks!

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