React-native-gesture-handler: PanGestureHandler for web

Created on 27 Mar 2019  路  6Comments  路  Source: software-mansion/react-native-gesture-handler

@jaulz thanks for the initial web support. I saw that unfortunately support for pan gestures is still missing. How feasible do you think it is to add support via RN-web's PanResponder? I'd be willing to help, but I'm unfamiliar with this so far.

Most helpful comment

Thanks to @EvanBacon we recently merged #555 that brings gesture handler to web. Closing this. In case of any issues please open a new ticket

All 6 comments

I don't think it'a big deal. You just need to listen to the PanResponder events and trigger the react-native-gesture-handler events if the conditions are met. Not complicated but you need to fiddle around with it I think which could take some time.

@MrLoh have you been taking a stab at this?

No, haven鈥檛 had any time for it unfortunately.

For anyone coming here, PanGestureHandler for web is implemented in https://github.com/kmagiera/react-native-gesture-handler/pull/555
I can confirm the work on a browser.

To have it working,I got to defined a minDist attribute to my PanGestureHandler.
I don't think this is intended as we create to minDistSqrt https://github.com/kmagiera/react-native-gesture-handler/blob/5713701f4359dc11f4fb7ad3e4d78100b49730ce/web/PanGestureHandler.js#L72, but shouldActivateUnderCustomCriteria is called with props and not this default config, so I guess that make sense.

  <PanGestureHandler minDist={3} onGestureEvent={this._onPanGestureEvent} >

@maxired could you open a new issue with the details of the parity bug.

Thanks to @EvanBacon we recently merged #555 that brings gesture handler to web. Closing this. In case of any issues please open a new ticket

Was this page helpful?
0 / 5 - 0 ratings

Related issues

rt2zz picture rt2zz  路  4Comments

brunolemos picture brunolemos  路  3Comments

alexthebake picture alexthebake  路  3Comments

chhornponleu picture chhornponleu  路  3Comments

rgangopadhya picture rgangopadhya  路  4Comments