-
Notifications
You must be signed in to change notification settings - Fork 163
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
Initial zoom is wrong in Container mode #7
Comments
I played with the library a bit. By replacing
with
I get the wanted effect, which is the image showing up at it's native size or zoomed in if a parameter was passed. Next is the snap view:
|
That part of code is required to contain image inside container, changing that may affect on other modes. I am out town for few days . Will be fixing once i am back. |
Yeah, I've noticed that the fullscreen mode has the same problem where images will be stretched to fit. |
Any news? :) |
So In ImageViewer now it behaves as backgound-size contain for a given container. And whatever size is coming at that point I am considering it as 100% zoom, which literally is not correct.
|
This is a sample setup
and the code used
The slideshow CSS
The large image has the following style applied to it:
width: 918px; height: 918px
, but the original image is 50x50.I've tracked it down to this line, which stretches the image to fill the container:
https://github.com/s-yadav/ImageViewer/blob/master/imageviewer.js#L608
I think there should be a limit applied, using the initial zoomValue.
The text was updated successfully, but these errors were encountered: