-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Possible Bug When All Keyed Elements Don't Have A Counterpart On The Next State #2
Comments
Are you trying to ask how you can animate out the other items? Also do you have a link to this code? |
No. I just want the single grid item that was clicked to animate back in. Only the grid item I clicked in the screencast has a I dont have the code live on our staging server yet because it isn't working how I expect it to (please do let me know if I'm wrong). But maybe some pseudo code will help demonstrate the situation I just described. So it starts out with markup like this: Grid View<div>
<div data-flip-key="agency">...</div>
<div data-flip-key="farmers-market">...</div>
<div data-flip-key="fashion">...</div>
<div data-flip-key="learning-management-lms">...</div>
<div data-flip-key="coffee-shop">...</div>
<div data-flip-key="restaurant">...</div>
<div data-flip-key="travel-agency">...</div>
<div data-flip-key="wedding">...</div>
<div data-flip-key="yoga-studio">...</div>
<div data-flip-key="design-agency">...</div>
<div data-flip-key="coffee-shop">...</div>
<div data-flip-key="photo-marketplace">...</div>
</div> Details View<div>
<div data-flip-key="restaurant" class="screenshot">...</div>
<div class="details">...</div>
</div> After clicking on the restaurant grid item everything works fine (as shown in the gif). The markup is unchanged AFAICT. Now, if I click to go back to the gridview, instead of transitioning that one grid item back in, it transitions all the grid items back in (as shown in the gif). The markup again, appears to be unchanged (so there is nothing leftover that might hint at what is going wrong). I hope that I was able to explain it in enough detail. Please let me know if it makes sense. In the meantime I will try and get the bug live on the staging server so you can see it if you think that would still be helpful 😃 |
After deeper investigation, I'm pretty sure the current behavior is intentional. I'm able to achieve the behavior I'm looking for by editing |
Sure. I'm actually planning on removing the const flipping = new Flipping({
onEnter: (stateMap) => {
Object.keys(stateMap).forEach(stateKey => {
const state = stateMap[key];
if (state.type === 'ENTER') {
// do your own custom animation
state.element.animate(...);
}
});
}
}); |
That makes much more sense than what I resorted to :doh: THANKS!!! |
Hi! 😃 I'm not sure if this is a bug or just a user error on my part. I think it'll be easier to show you than to explain it:
Basically, each grid item has a unique
data-flip-key
value. When you click on an item, the details page will have only that items key on the larger image. Any thoughts? 🤔The text was updated successfully, but these errors were encountered: