react-native-image-fit
react-native-image-fit copied to clipboard
[Suggestion] Zoom
Hey, thanks for your component it works great!
But can you add a Zoom feature ? Because doubleTap is good but zoom with your finger it's greater i think !
Thanks :)
Hi @Clowning !. Thanks for the suggestion, i'm totally agree.
We have component for such (zoom, punch, drag, etc.) functionalities https://github.com/react-armenia/react-native-view-editable.
So we have to use some calculations from there, or you can use this component and wrap ImageViewer with ViewEditable
<ViewEditable>
<ImageViewer />
</ViewEditable>
@shahen94 - would you mind elaborating on this? I just tried it with the following code:
<ViewEditor
scaleBounds={{min: 1, max: 10}}
onMove={() => console.log('move')}
onMoveEnd={() => console.log('move end')}
>
<ImageViewer
mainImageProps={{
resizeMode: 'contain'
}}
zoomedImageProps={{
resizeMode: 'contain'
}}
mainImageStyle={{width: 300, height: 200, borderRadius: 5}}
source={{uri: uri}}
/>
</ViewEditor>
but didn't have any success.
Hi @compojoom - yea that's what i meant. Well - this will take 5min of work, i don't know when i can work on this, if someone want to handle this suggestion - i'll merge the PR right away.