laurenashpole / react-inner-image-zoom

A React component for zooming images.
https://laurenashpole.github.io/react-inner-image-zoom
MIT License
325 stars 36 forks source link

Image not taking up full width of container #137

Open lopugit opened 1 year ago

lopugit commented 1 year ago

Hello, thanks so much for making this great and easy to use library.

I'm just running into an issue where an image will not take up more than it's native width in both unzoomed and zoomed in mode.

I have fixed the unzoomed mode issue by setting the width argument to a pixel value much greater than the images actual width, the image is then still constrained by the 100% width limit of the parent but it will grow larger than its native pixel width.

However even with this fix, the zoom functionality doesn't seem to work, setting zoomScale to a custom value seems to make the image show with a border and not be centered properly.

Is there a predefined way to make an image work and render at resolutions higher than its native resolution?