Skip to content

Change Pinch Gesture Handler Behavior to transition to END state after one finger is taken off screen and one left #1214

@terrysahaidak

Description

@terrysahaidak

Description

After testing PinchGestureHandler in react-native-gallery-toolkit I found that on the real device Pinch gesture is active even though we have only a single finger on the screen. This breaks my focal point logic which is working as expected on Android.

Screenshots

As soon as I release one finger - it jumps because now the focal point is not the point between fingers, but that single finger location.

But it should just transition to state "END" instead.

RPReplay_Final1603130602

Steps To Reproduce

  1. Run pinch example
  2. Add log to onGestureEvent of PinchHandler
onGestureEvent={(evt) => console.log(evt.nativeEvent.numberOfFingers)}
  1. Do the pinch then release one finger and move it
  2. See that it fires even with 1 finger pressed after wi

Expected behavior

The gesture should be in the state "end" as soon as the user releases one finger – just like on Android

Actual behavior

The gesture remains active even when the user released one finger

Snack or minimal code example

Run the example app

Package versions

  • React: 16.13.1
  • React Native: 0.63.3
  • React Native Gesture Handler: 1.8.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions