merryjs / photo-viewer

A photo picture viewer for React Native

Home Page:https://merryjs.github.io/photo-viewer/interfaces/merryphotoviewporps.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to keep track of slide changes?

dswbx opened this issue · comments

commented

is there a way to track a slide change (i.e. onChange)? Like e.g. onDismiss gives the option to catch when viewer has been dismissed.

@rssfeed Sorry. have no such events now. can you explain where you need this events.

commented

@BANG88 is there a possibility to add such an event?
I need it to sync the image carousel. There is an image carousel showing cropped images, once pressed PhotoViewer shows up (with full version of images). When changing index within PhotoView, the carousel below should update according.

Maybe will implement it in the future. would you like give it a try ?

commented

that'll be awesome :)
what do you mean, me trying to create a PR? I can try, but my native knowledge is limited..

but doesn't this line here trigger the event to react native (commented out)?

// RCT_EXPORT_VIEW_PROPERTY(onNavigateToPhoto, RCTBubblingEventBlock)

and here on Android:

// .put("onNavigateToPhoto", MapBuilder.of("registrationName", "onNavigateToPhoto"))

Yep.

commented

So why have those been commented out? Has there been an issue?

Because this feature are useless and yes its a WIP feature. not complete yet.

commented

I understand, I'll be patient. Thanks for your help 👍