Skip to content

Add 'onSwipedVertical' and 'onViewTransforming' events - #48

Open
infostreams wants to merge 3 commits into
meliorence:masterfrom
infostreams:patch-3
Open

Add 'onSwipedVertical' and 'onViewTransforming' events#48
infostreams wants to merge 3 commits into
meliorence:masterfrom
infostreams:patch-3

Conversation

@infostreams

Copy link
Copy Markdown
Contributor

Can be used to close the gallery by swiping up or down ('onSwipedVertical'), and to lighten the background while dragging up ('onViewTransforming')

So you can detect the exact transform the user is currently applying to the image, and (for example) decrease the opacity of the background if the image is being dragged up
Prevents accidentally triggering event while swiping horizontally
@infostreams

Copy link
Copy Markdown
Contributor Author

Ok, that's it. It's working correctly for me now, I can successfully and easily swipe away a picture to close the gallery.

@Stmol

Stmol commented Jan 16, 2018

Copy link
Copy Markdown

@Exilz can you merge this PR please?

Sorry! I tested it on a real device (iPhone 7 Plus, RN 0.52.0) and it does not work properly.

@infostreams

Copy link
Copy Markdown
Contributor Author

Can you be a bit more specific?

@edi

edi commented Jan 24, 2018

Copy link
Copy Markdown

Any news on this one ? I'd very much like to see it merged 👍

@infostreams

Copy link
Copy Markdown
Contributor Author

I tried it as well, and something broke somewhere in my merge. Additionally, I'm starting to think that https://github.com/merryjs/photo-viewer is perhaps a better library for my needs... Only works if your project is ejected already though.

@edi

edi commented Jan 24, 2018

Copy link
Copy Markdown

Can you explain what ejected means please ? First time hearing that term.

@infostreams

Copy link
Copy Markdown
Contributor Author

@edi

edi commented Jan 24, 2018

Copy link
Copy Markdown

Ah ok! I was aware of that whole CRNA vs react-native init mess but never knew it's called ejecting. In that case I'm fine, never used CRNA for a project.

Cheers!

@infostreams

Copy link
Copy Markdown
Contributor Author

For what it's worth, I've now merged the patches correctly and the version at https://github.com/infostreams/react-native-image-gallery/tree/dev is working. It's nowhere near as smooth or nice as the gallery component I linked to above, but it'll do. You can install it as follows

npm install --save "git+https://github.com/infostreams/react-native-image-gallery.git#dev"

Demo with cropped screen of fake profile page: http://gph.is/2GfhKBW

@dswbx

dswbx commented Mar 14, 2018

Copy link
Copy Markdown

When is this going to be merged?

@Strate

Strate commented Dec 10, 2018

Copy link
Copy Markdown

Why not to merge it?

@devjiro76

Copy link
Copy Markdown

plz merge this

@edi

edi commented Jun 28, 2019 via email

Copy link
Copy Markdown

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants