justhive / react-native-view-editor

A simple wrapper for being able to rotate, pan, and resize a child view or image with animations.
https://medium.com/@sscaff1/react-native-image-panning-zooming-832aef361c87#.dyvem0jr4
29 stars 16 forks source link

FYI #1

Closed st0ffern closed 8 years ago

st0ffern commented 8 years ago

https://github.com/stoffern/react-native-image-cropper

sscaff1 commented 8 years ago

@stoffern Looks really cool. Thanks for sharing with me. Mine is meant to restrict the resizing an panning in it's containing view (similar to instagram or twitter when adding a photo), but it doesn't crop like yours does. I don't know if that's the purpose of your package. If it is, I can submit a PR to combine our libraries.

st0ffern commented 8 years ago

@sscaff1 if you disable zoom or set it to 1 your effect is already there... ;)

sscaff1 commented 8 years ago

@stoffern Have you played around with my component? You can set a mask over the image and the image will actually bounce (animated) back out to fit the width of the mask. Or if you pan beyond the the limits of the mask it'll snap back into the place. That's why there is so much logic in my component.

sscaff1 commented 8 years ago

That's why I'm cloning the child in the component so I can pass it the animated width and height since I can't flex a GL surface.