photo_view icon indicating copy to clipboard operation
photo_view copied to clipboard

Callbacks

Open renancaraujo opened this issue 5 years ago • 3 comments

Right now PhotoView is very short on callbacks. I'm sure that with the exposition of the internal state through the controller, most of the internal events will be accessible. But I'm sure that some callbacks would make things easier. React native's implementation of PhotoView has a lot of them. So I want to hear from you which callbacks you would like to be included in PhotoView's options?

renancaraujo avatar Jan 14 '19 20:01 renancaraujo

I will start with some I have on mind:

  • onDoubleTap When user double-taps PhotoView, before subsequent scale state changes

  • onScalestart When a scale gesture or animation starts

  • onscalefinish when a scale gesture or animation finishes

renancaraujo avatar Jan 14 '19 20:01 renancaraujo

Please also consider adding

  • onPanStart When user starts dragging to move the photo (usually by tap-hold-move)

  • onPanFinish When user finishes dragging to move the photo

and

  • onScaling When user has changd the scale of the photo (and continues changing)

  • onPanning When user has moved the photo (and continues moving)

Thanks.

ElTopo avatar Jan 22 '19 21:01 ElTopo

image loadErrorCallback

pxc0215 avatar Nov 01 '19 12:11 pxc0215