-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Fix a bug with the image preview bounds #1233
Conversation
The image should default to its natural size if that natural size fits within the window. From your screen recording it looks scaled up to fit the container by default. This should only happen if the natural image size is larger than the viewport bounds. |
Good catch! I'll fix that. |
Can you update your screen recording? |
Sorry I'm seeing this late, anyways, the video has been updated @austincondiff. |
It looks like there is a strange thing happening around the rubber band effect. It is like the cap is the current size so when you zoom, it tries to bounce back but it ends up sticking to the larger size so you need to start the gesture over to get it bigger. This results in excessive gestures to get it to the desired size. Is that what I am seeing? |
It's intended behavior @austincondiff, even Preview.app does it when zooming in/out abnormally fast (zooming in/out at a more normal speed does not have this rubberbanding) shot.4.movif you want this changed or removed I can fix this w/ .scrollBounceBehavior(.basedOnSize) also, should the scroll indicators be hidden? |
Rubberbanding itself was never in question. We should definitely have rubberbanding. It just looked like from the screen recording that it wasn't allowing you to resize past a certain point in a single gesture. I might be wrong though. Edit: I am noticing the same in your screen recording of Preview so it may be a false alarm. I think you are just doing many short gestures which let me to my observation. |
I agree w/ your edit; this is me zooming in/out slowly, there is no resizing problem (that was probably misjudged because i have a small trackpad @austincondiff) shot.5.mov |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
Description
this
PR
fixes a bug where the image preview bounds were the size of the image itself.Related Issues
Checklist
Screenshots
shot.2.mov
shot.3.mov