ladlon Posted July 5, 2020 Share Posted July 5, 2020 I'm curious... What happens when you try and tween a 'binary' property, such as 'Visibility'? Does it remain at the initial state until the duration is complete, and then switch to the new value? It obviously can't 'tween/fade' to it, so I'm curious how GSAP treats such a thing. Link to comment Share on other sites More sharing options...
OSUblake Posted July 5, 2020 Share Posted July 5, 2020 Create a test and find out. var div = document.querySelector("div") var style = getComputedStyle(div) console.log(style.visibility) gsap.to(div, { visibility: "hidden", onUpdate() { console.log(style.visibility) } }) 4 Link to comment Share on other sites More sharing options...
GreenSock Posted July 6, 2020 Share Posted July 6, 2020 Yeah, it generally sets the (new) value right away except for "display: none" which it'll do at the end because it would be very odd to have that set initially. 2 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