Friebel Posted February 25, 2020 Share Posted February 25, 2020 Using onComplete inside the stagger-object of a tween I want to add parameters to it. But it ignores the onCompleteParams put inside the stagger-object (undefined). Instead, it's using the onCompleteParams of the parent tween. IMHO this is unexpected behaviour, I would expect the stagger-object, with its own onComplete function, to have its own onCompleteParams too. I'm not sure if this is done on purpose, but being able to have a different onCompleteParams inside the staggerobject would make more sense to me. Also, if I'm not overlooking things, being able to use onComplete inside a stagger object is something I read here from @OSUblake (thanks for the tip!), but can't find it in the documentation next to .stagger. Maybe add this information inside the info on .stagger in the documentation? But again, I might be overlooking things as I didn't read everything there is. I would just expect it to be there somewhere, but couldn't find it. (https://greensock.com/docs/v3/GSAP/Tween ) BTW @GreenSock this was one of the reasons why staggers weren't working in a project (I was talking about it previously in another thread). See the Pen rNVjRMK by Friksel (@Friksel) on CodePen 1 Link to comment Share on other sites More sharing options...
ZachSaucier Posted February 25, 2020 Share Posted February 25, 2020 I agree that it would be useful to give staggers their own params. However, I am not sure how much people would use this in practice or how much kb it'd cost and whether or not that's worth it, especially since you can get the same behavior by using bind: this.onStaggerPartComplete.bind(null, 'part') I'm sure @GreenSock will come by and give his thoughts on the subject. 3 hours ago, Friebel said: Also, if I'm not overlooking things, being able to use onComplete inside a stagger object is something I read here from @OSUblake (thanks for the tip!), but can't find it in the documentation next to .stagger. Maybe add this information inside the info on .stagger in the documentation? https://greensock.com/stagger/ is our primary stagger documentation. We're working on getting it into the actual docs today The video on that page covers the use of callbacks inside of the stagger object but we should also add a bit about callbacks in the text portion. Thanks again for posting. 1 Link to comment Share on other sites More sharing options...
GreenSock Posted February 25, 2020 Share Posted February 25, 2020 Yep, that's a good catch. Sorry about the confusion there - I can add the params parsing to the advanced staggers object. It's done in the next release which you can preview at https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/gsap-latest-beta.min.js 2 1 Link to comment Share on other sites More sharing options...
Friebel Posted February 29, 2020 Author Share Posted February 29, 2020 On 2/25/2020 at 6:03 PM, GreenSock said: Yep, that's a good catch. Sorry about the confusion there - I can add the params parsing to the advanced staggers object. It's done in the next release which you can preview at https://s3-us-west-2.amazonaws.com/s.cdpn.io/16327/gsap-latest-beta.min.js @GreenSock Jack, I just tested version 3.2.2 and can confirm this is working as expected now! Thanks for your fast responses and fixes! 3 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now