Thank you for the wonderful library and for making a useful contribution to OpenSource!
We have integrated this library into our application, it works quite well, but there were some problems when viewing the image.
This is due to an incorrect size setting for the image. There are 2 cases:
Undetermined order of calling the setImageDimensions function from useEffect and onLoad
We may have a situation where onLoad was called faster than useEffect when initializing the component. In this case, useEffect sets the width and height values to 0. This leads to a problem when the user cannot move the image when zooming in.
This is due to the library's `react-native-reanimated' feature.
In the JS stream, the values from the useSharedValue are updated asynchronously, for example:
Hi, Pavel!
Thank you for the wonderful library and for making a useful contribution to OpenSource!
We have integrated this library into our application, it works quite well, but there were some problems when viewing the image.
This is due to an incorrect size setting for the image. There are 2 cases:
setImageDimensions
function fromuseEffect
andonLoad
We may have a situation where
onLoad
was called faster thanuseEffect
when initializing the component. In this case,useEffect
sets the width and height values to 0. This leads to a problem when the user cannot move the image when zooming in.This is due to the library's `react-native-reanimated' feature.
In the JS stream, the values from the useSharedValue are updated asynchronously, for example:
Example: A 200x300 picture on an iPhone 15. Gallery is displayed in full screen
https://github.com/pavelbabenko/react-native-awesome-gallery/assets/30261345/d873caa9-dc13-47c2-9bb2-62308b720a3a
If you have any questions, ask!)