Skip to content
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

Added the ability to specify opening and closing animation props #91

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

davidrichard23
Copy link

My specific use case is that the image in my Lightbox uses resizeMode='cover' while not active and resizeMode='contain' while active -- so basically it's cropped while in a list and not cropped while open.

During the closing animation, it would keep the contain prop until the animation was finished. This resulted in black bars around the image until the end of the animation and then it would instantly pop to the cover prop which looked terrible.

I found that by setting the cover prop before the close animation starts, everything works great.

I'm unsure if this was the best way to accomplish this so I'm open to any feedback anyone has.

@brycepavey
Copy link

I had the same issue, would be great if this could be merged in!

@RWOverdijk
Copy link

I tried this, and the problem just turns around when the image doesn't have an edge to edge size. It'll just jump and then resize, which I think looks worse.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants