Jump to content
Search Community

A Problem with Flip onEnter

ywlee test
Moderator Tag

Go to solution Solved by GreenSock,

Recommended Posts

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

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

  • Solution

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). 



Is that what you're looking for? 


  • Like 2
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
  • Create New...