Open jjhesk opened 7 years ago
adding resizeMode={'contain'} seems to help:
<PhotoView resizeMode={'contain'} />
http://facebook.github.io/react-native/docs/image.html#resizemode
resizeMode doesn't seem to work with PhotoView.
Is does work for me :)
For Android, make sure you're using the androidScaleType
prop - the docs demo it using center
, but if your sides are being cropped off the image, you likely want fitCenter
.
For some reason, some pictures do not fit. The problem only occurs on iOS. :/
Does anyone know if this project is under maintenance? I see a lot of issue unanswered.
@douglasjunior prop minimumZoomScale={0.5}
seems to change the image size, if you remove it then the image scales/fits correctly. Haven't tested on Android to see if it affects anything.
I'm using minimumZoomScale={1}.
I found the bug and sended a PR #86
Same issue here, @douglasjunior PR does the trick
I have checked the function and there is a lack of detection for size. The size of the image will be cropped if the initial loaded size is bigger than the screen and the size of the photoview is set to the size of the screen. here is the source: