AsKadir Posted May 11, 2020 Share Posted May 11, 2020 Hi! I'm sorry, but I have some issue with mouseleave, in demo as you can see image with overlay is not dissapearing, if I make tl.reverse() on mouseleave everything is fine, but I need my timeline to hide everything immediately. What am I doing wrong? See the Pen XWmzGYz by ChicagoJostik (@ChicagoJostik) on CodePen Link to comment Share on other sites More sharing options...
ZachSaucier Posted May 11, 2020 Share Posted May 11, 2020 I've very confused why you are adding the .set()s to the timeline. Why not just use gsap.set()? However, in this case, all you need to do instead of any .set()s is just tl.pause(0). It'd also be helpful to keep track of the state to know when you should play the timeline. See the Pen QWjxjjm?editors=0010 by GreenSock (@GreenSock) on CodePen I highly recommend my article on animating efficiently because it covers using control methods 1 Link to comment Share on other sites More sharing options...
AsKadir Posted May 11, 2020 Author Share Posted May 11, 2020 @ZachSaucier Thanks! I tried too much method that even tried to use set()s in timeline, Even so it doesn't work with gsap.set() too. Can you try use gsap.set instead of tl.pause(0), please? I can't understand how to make it work with gsap.set(). Link to comment Share on other sites More sharing options...
ZachSaucier Posted May 11, 2020 Share Posted May 11, 2020 12 minutes ago, AslanGoi said: Can you try use gsap.set instead of tl.pause(0), please? You really should not be using set calls here. Because they prevent the timeline from functioning again so you'd have to recreate it again. Just use .pause(0). 1 Link to comment Share on other sites More sharing options...
AsKadir Posted May 11, 2020 Author Share Posted May 11, 2020 14 minutes ago, ZachSaucier said: You really should not be using set calls here. Because they prevent the timeline from functioning again so you'd have to recreate it again. Just use .pause(0). Thanks a lot, Zach!!! I really appreciate your help! 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