Skip to content

Commit

Permalink
fix: override fix for most gestures
Browse files Browse the repository at this point in the history
  • Loading branch information
farfromrefug committed Apr 9, 2022
1 parent 4f2f1e0 commit bcd9bae
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/gesturehandler/gestures_override.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ export class GesturesObserver {
gestureHandler.attachToView(target);
target._gestureHandlers[type] = gestureHandler;
}
gestureHandler.on(GestureHandlerStateEvent, this.onGestureStateChange(GestureTypes.doubleTap), this);
gestureHandler.on(GestureHandlerStateEvent, this.onGestureStateChange(GestureTypes.doubleTap, GestureState.ACTIVE), this);
}

if (type & GestureTypes.pinch) {
Expand All @@ -232,7 +232,7 @@ export class GesturesObserver {
gestureHandler.attachToView(target);
target._gestureHandlers[type] = gestureHandler;
}
gestureHandler.on(GestureHandlerStateEvent, this.onGestureStateChange(GestureTypes.pinch), this);
gestureHandler.on(GestureHandlerStateEvent, this.onGestureStateChange(GestureTypes.pinch, GestureState.ACTIVE), this);
gestureHandler.on(GestureHandlerTouchEvent, this.onGestureTouchChange(GestureTypes.pinch), this);
}

Expand All @@ -244,7 +244,7 @@ export class GesturesObserver {
gestureHandler.attachToView(target);
target._gestureHandlers[type] = gestureHandler;
}
gestureHandler.on(GestureHandlerStateEvent, this.onGestureStateChange(GestureTypes.swipe), this);
gestureHandler.on(GestureHandlerStateEvent, this.onGestureStateChange(GestureTypes.swipe, GestureState.ACTIVE), this);
}

if (type & GestureTypes.pan) {
Expand All @@ -255,7 +255,7 @@ export class GesturesObserver {
gestureHandler.attachToView(target);
target._gestureHandlers[type] = gestureHandler;
}
gestureHandler.on(GestureHandlerStateEvent, this.onGestureStateChange(GestureTypes.pan), this);
gestureHandler.on(GestureHandlerStateEvent, this.onGestureStateChange(GestureTypes.pan, GestureState.ACTIVE), this);
gestureHandler.on(GestureHandlerTouchEvent, this.onGestureTouchChange(GestureTypes.pan), this);
}

Expand All @@ -267,7 +267,7 @@ export class GesturesObserver {
gestureHandler.attachToView(target);
target._gestureHandlers[type] = gestureHandler;
}
gestureHandler.on(GestureHandlerStateEvent, this.onGestureStateChange(GestureTypes.rotation), this);
gestureHandler.on(GestureHandlerStateEvent, this.onGestureStateChange(GestureTypes.rotation, GestureState.ACTIVE), this);
gestureHandler.on(GestureHandlerTouchEvent, this.onGestureTouchChange(GestureTypes.rotation), this);
}
if (type & GestureTypes.touch && global.isIOS) {
Expand Down

0 comments on commit bcd9bae

Please sign in to comment.