Skip to content

Commit

Permalink
Support for touch gestures on web/GestureView by creating a common ba…
Browse files Browse the repository at this point in the history
…se component (#1167)

* Moved most of the logic from the native-common/GestureView control into a straight common/GestureView abstract base component, and changed much of the logic away from using raw events as inputs and into the processed RX GestureState types.  Pulled a bunch of the duplicate logic out of web/GestureView and used the new base class.  Added touchstart/move/end support to web/GestureView to now reuse the touch code out of the common GestureView to get web touch support in GestureView!

* Fixing issues on native

* PR feedback
  • Loading branch information
deregtd authored Nov 30, 2019
1 parent 8d82ebf commit 46e0610
Show file tree
Hide file tree
Showing 10 changed files with 840 additions and 844 deletions.
2 changes: 1 addition & 1 deletion src/android/GestureView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ export class GestureView extends BaseGestureView {
return _preferredPanRatio;
}

protected _getEventTimestamp(e: Types.TouchEvent): number {
protected _getEventTimestamp(e: Types.TouchEvent | Types.MouseEvent): number {
let timestamp = e.timeStamp;

// Work around a bug in some versions of RN where "timestamp" is
Expand Down
Loading

0 comments on commit 46e0610

Please sign in to comment.