-
Notifications
You must be signed in to change notification settings - Fork 383
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
Images Cropped/Sized by Content Mode Animate Incorrectly #150
Comments
This isn't caused by #116; I just followed @bcapps' instructions (image taller than it is wide, and image view with content mode = aspect-fill) and reproduced consistent results on current
|
Yup! |
I wonder what a "correct" animation looks like here. |
I also narrowed it down to this line in the transition animator. It assumes that the heights of the images should be used to scale the initial transform, but for content modes that end in "Fill," it should be using the width. You'll notice that changing the height retrieval to |
One potential solution that I haven't fully tested yet, then, would be to check the |
@bcapps I just tried your solution and it works for me. Example code:
The thing is, it's still not perfect. Beyond the zoom and fade animations, there should also be a frame animation. It's hard to explain, but this is a good example: As a suggestion, maybe switch to that library for the animation, or at least use it's animation code for inspiration? |
@djbe This commit doesn't seem to fix the issue. |
close image animation glitch fixed
Having same issue, image are cropped! |
Images used in the transition animation do not reflect the cropped/resized state of the image within their image views. Instead, they show the image resized to the size of the containing image view, ignoring the aspect ratio and providing a very strange transition.
To test, switch out the image in the sample project with one that is much taller than it is wide. Set a content mode of aspect fill on the image view. Slow down the transition and see how the original image in the transition is now the full image, resized down to the containing image view size, with incorrect aspect ratios. It looks pretty funky.
The text was updated successfully, but these errors were encountered: