-
Notifications
You must be signed in to change notification settings - Fork 65
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
Resizing browser window or rotating mobile device should result in corrected image size being displayed. #142
Comments
I have an idea on how to quickly solve this... |
After having toyed with it a bit it seems it's more complicated than I anticipated, so I will see if someone else wants to give it a go. Photoswipe could be a better alternative to Bigshot since it supports zooming, swiping and resizing, but it's too early to tell and we would lose the proper zooming that Bigshot offers (not implemented yet). |
I've had a look at Photoswipe's API and one reason it works well is because it needs to be given the dimensions of the images at initialisation time. Unfortunately ownCloud doesn't know anything about the images it's sending back, so there is no immediate solution, but starting from 8.1, oC will have a max size preview from which all subsequent previews are generated and we might be able to hack something together to calculate the image size based on that information and the screen size.
Regarding the change of browser window size, past a certain point, there is no way around loading a new image. The core preview system should be upgrade one day to offer S, M and L previews and that would make things easier. |
The above approach can't be taken for 2 reasons:
So we'll have to wait for a version of oC which supports meta data and automatic thumbnail generation on upload. |
I really appreciate the time spent looking into this issue and #141. It sounds like both would be helped by some image meta data storage in the future. Thanks again. |
We need some people to test this on their mobile Just start the slideshow with a wide or tall picture and rotate your device. The image should always touch 2 sides of the phone. |
@oparoz to test what exactly – is there a pull request? :) |
There was :) For testing, you just need to use master or dev, depending on your setup and load some pictures in the slideshow to see if they adapt to the screen size when rotating the device. On the current release (11), they don't, so if you're in portrait mode and go landscape, you still get the small picture. |
It seems to work all fine here. |
Thanks! :) |
In the gallery slideshow, if a user changes the browser window size, the image should be corrected to fit the new window size. This is very evident when using a mobile device to view photos. It's normal to assume a user will try rotating a phone to match portrait or landscape images and expect the image to fill the screen correctly.
This might mean we should request the scaled image based on the longest edge of the screen for both X and Y and then always resize to fit the browser. Otherwise the image might need to be re-downloaded (bad?). I'm not sure.
Again, PhotoSwipe does this correctly, but there might be other ways to accomplish this.
http://photoswipe.com/
The text was updated successfully, but these errors were encountered: