Closed JonathanReisCom closed 3 years ago
any solutions?
@JonathanReisCom did you find a good solution? thanks!
No, sorry.
Can you please provide an example, that I can build on from and check the problem? You can use the following as a starting point: https://github.com/DuDigital/react-native-zoomable-view-example
Closed for being stale.
Hello people.
How do I get the initial zoom to fit my screen size?
Example: My image is width 1080 (myimage.width) My screen is width 375 (windowdimension.width ) And the scale is 3 (windowdimension.scale)
The calculation I'm doing is this:
const windowdimension = Dimensions.get('window'); const zoom = myimage.width / windowdimension.width / windowdimension.scale; What returns 0.96
But it does not fit perfectly on the screen, it is much larger, if I check using the log and go down, the ideal scale should be 0.59, could someone help me?