Share Posted August 29, 2022 Hi everyone! As shown in the codepen, the .container2 [data-flip-id=sq2] didn't get to the elements for onEnter when there is an element(display : none) with the same [data-flip-id] in the previous state, is this a bug? Thanks in advance! EDIT: The codepen is now using the latest beta version of Flip, so it looks perfect now. See the Pen BargrGa by ywlee (@ywlee) on CodePen Link to comment Share on other sites More sharing options...
Share Posted August 29, 2022 No, that's not a bug. How would you expect it to get any positioning data from something that is display: none? I'm confused. Please describe exactly what you expect to happen and what you think the bug is. Link to comment Share on other sites More sharing options...
Author Share Posted August 29, 2022 Sorry I didn't make it clear I expect that element to be passed to onEnter callback and have a fade in effect in the codepen, since for the flip-id=sq2 there is no positioning data in the previous state but it appears in the final state But in the codepen, it get flipped from the top left corner instead of fading in Link to comment Share on other sites More sharing options...
Solution Solution Share Posted August 29, 2022 Hm, I think I see what you mean now. It's because you've got a swapping state and those are never considered entering/leaving but I can see why you could make an argument that if one side is invisible (display: none), it should be considered entering/leaving. I'll have to see if this causes other problems, but I just updated the beta version that's on CodePen with that change and it seems to work fine in your demo (you may need to clear your cache). https://assets.codepen.io/16327/Flip.min.js Is that what you're looking for? 2 Link to comment Share on other sites More sharing options...
Author Share Posted August 29, 2022 It looks very good now! Thank you very much for the quick and helpful respond as always. 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