alwx / react-native-photo-view

Pinch-to-zoom view for React Native (both iOS and Android)
MIT License
815 stars 434 forks source link

Fixing initialZoomScaleWithMinScale when image is larger than the screen #86

Closed douglasjunior closed 1 year ago

douglasjunior commented 7 years ago

For some reason, when the image is too large, it does not open in fit mode. #38

During the debug I realize that the value of self.minimumZoomScale is not consistent during the calculation. Storing this value in a variable solved the problem.

douglasjunior commented 7 years ago

@alwx could you give me a suggestion?

douglasjunior commented 7 years ago

Example before the change, note that the image starts a little zoomed:

photoview

After change:

photoview-ok

douglasjunior commented 6 years ago

@alwx please, let me know if you need help to maintain this repository.

almasaeed2010 commented 6 years ago

Just a note that this fix has worked for my on iOS. Without this fix, the issue still persists on iPhone <= 8

before fix after fix
screen shot 2018-05-07 at 12 13 08 pm screen shot 2018-05-07 at 12 13 14 pm

If it's at all possible to use this logic instead, it'd be wonderful.

Thanks!

antsmo commented 6 years ago

Any reason why this hasn't been merged yet?

khloukrada commented 5 years ago

work perfectly.

loiclouvet commented 5 years ago

I need this too :)