oblador / react-native-lightbox

Images etc in Full Screen Lightbox Popovers for React Native
MIT License
2.82k stars 501 forks source link

Pinch to zoom #106

Closed oblador closed 6 years ago

oblador commented 6 years ago

Based loosely on @ZackLeonardo's PR #85 for use in upcoming 1.0 refactor.

peteroid commented 6 years ago

Do you think we should add useNativeDriver whenever possible ? Or we make it to be a prop that others can override it if they don't want it. Actually, useNativeDriver prop could be added to any Animated in this repo for the sake of performance.

oblador commented 6 years ago

@peteroid Fixed, although in this specific case I don't think it makes much of a difference. Where it would make a difference to use the native driver is the gesture handler, but since it's kind of complex I don't think we can do so easily. To make optimal performance we'd need to tap into native code or wait for react-native-gesture-handler to be merged into react-native master. For iOS we get this for free with the ScrollView

oblador commented 6 years ago

@peteroid You OK to merge?

peteroid commented 6 years ago

It looks good. Let me try it out in my own project.

On Tue, May 15, 2018, 10:30 PM Joel Arvidsson notifications@github.com wrote:

@peteroid https://github.com/peteroid You OK to merge?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/oblador/react-native-lightbox/pull/106#issuecomment-389188152, or mute the thread https://github.com/notifications/unsubscribe-auth/AMGfJMKKPAt1E6Q5j5DaWjziPxngiEbTks5tyuabgaJpZM4T84hJ .

peteroid commented 6 years ago

Just a side note, if I am using this as below, I need to forward the native props from the scrollview to make it render without error on iOS. I am not sure if this an issue or not.

<Lightbox>
  <Zoomable>
    <MyComponent />
  </Zoomable>
</Lightbox>
oblador commented 6 years ago

@peteroid Cool, yeah bu I don't intend on using that way :-) I'll merge this one and get another PR on the way so you can see my ideas.

azhararmar commented 4 years ago

Is there no way to have stable pinch to zoom feature? this is in so-many cases so useful.