Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Suggestion] Zoom #5

Open
jonathanroze opened this issue Jun 26, 2017 · 3 comments
Open

[Suggestion] Zoom #5

jonathanroze opened this issue Jun 26, 2017 · 3 comments

Comments

@jonathanroze
Copy link

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 :)

@shahen94
Copy link
Owner

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>

@compojoom
Copy link

@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.

@shahen94
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants