WaReZoR Posted April 19, 2022 Share Posted April 19, 2022 First of all, I want to thank the friendly community, for helping newcomers! The idea is this, I want to make animation appearance of objects so that when you return the block, all the objects animated in reverse order, that is, began to appear not from top to bottom, but on the reverse, from bottom to top. Adding reverse to toggleActions doesn't work at all, which makes me even more confused. See the Pen rNpPxdG by warezor-ua (@warezor-ua) on CodePen Link to comment Share on other sites More sharing options...
Solution OSUblake Posted April 19, 2022 Solution Share Posted April 19, 2022 Hi WaReZor, Your toggle action is resetting the animation on leave, so there is nothing to reverse. You're already at the beginning. If I understand your goal correctly, you will probably have to make another animation when entering back, kind of like this. See the Pen bGazBqW by GreenSock (@GreenSock) on CodePen 3 Link to comment Share on other sites More sharing options...
WaReZoR Posted April 19, 2022 Author Share Posted April 19, 2022 Yes, that's exactly what I wanted to do, but I did not think that so much code is required for this, if you animate the other sections on the same principle, it will be very expensive =(. I thought there was some other method, which I have not yet learned about. In any case there is already some option, it's much better than nothing, thanks! Link to comment Share on other sites More sharing options...
OSUblake Posted April 19, 2022 Share Posted April 19, 2022 I wouldn't say expensive, more like tedious 😉 But that's what is needed because the enter back animation is in a different order than the enter one. That's why I had to reverse the items array. You can see that just doing the animation in reverse is not the same thing. See the Pen yLpZgew by GreenSock (@GreenSock) on CodePen 1 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