Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ sidebar_label: Force touch gesture
sidebar_position: 10
---

:::warning
ForceTouch gesture is depracted and will be removed in the future version of Gesture Handler.
:::

import BaseEventData from './\_shared/base-gesture-event-data.md';
import BaseEventConfig from './\_shared/base-gesture-config.md';
import BaseContinuousEventConfig from './\_shared/base-continuous-gesture-config.md';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ export type FlingGestureHandlerEventPayload = {
absoluteY: number;
};

/**
* @deprecated ForceTouch gesture is deprecated and will be removed in the future.
*/
export type ForceTouchGestureHandlerEventPayload = {
x: number;
y: number;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,14 @@ export type TapGestureHandlerGestureEvent =
export type TapGestureHandlerStateChangeEvent =
HandlerStateChangeEvent<TapGestureHandlerEventPayload>;

/**
* @deprecated ForceTouchGestureHandler is deprecated and will be removed in the future.
*/
export type ForceTouchGestureHandlerGestureEvent =
GestureEvent<ForceTouchGestureHandlerEventPayload>;
/**
* @deprecated ForceTouchGestureHandler is deprecated and will be removed in the future.
*/
export type ForceTouchGestureHandlerStateChangeEvent =
HandlerStateChangeEvent<ForceTouchGestureHandlerEventPayload>;

Expand Down Expand Up @@ -84,6 +90,9 @@ export type PanGestureHandlerProperties = PanGestureHandlerProps;
export type PinchGestureHandlerProperties = PinchGestureHandlerProps;
export type RotationGestureHandlerProperties = RotationGestureHandlerProps;
export type FlingGestureHandlerProperties = FlingGestureHandlerProps;
/**
* @deprecated ForceTouch gesture is deprecated and will be removed in the future.
Comment thread
latekvo marked this conversation as resolved.
*/
export type ForceTouchGestureHandlerProperties = ForceTouchGestureHandlerProps;
// Button props
export type RawButtonProperties = RawButtonProps;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@ import { ForceTouchGestureConfig } from '../ForceTouchGestureHandler';
import type { ForceTouchGestureHandlerEventPayload } from '../GestureHandlerEventPayload';
import { GestureUpdateEvent } from '../gestureHandlerCommon';

/**
* @deprecated ForceTouch gesture is deprecated and will be removed in the future.
Comment thread
latekvo marked this conversation as resolved.
*/
export type ForceTouchGestureChangeEventPayload = {
forceChange: number;
};
Expand All @@ -26,6 +29,9 @@ function changeEventCalculator(
return { ...current, ...changePayload };
}

/**
* @deprecated ForceTouch gesture is deprecated and will be removed in the future.
Comment thread
latekvo marked this conversation as resolved.
*/
export class ForceTouchGesture extends ContinousBaseGesture<
ForceTouchGestureHandlerEventPayload,
ForceTouchGestureChangeEventPayload
Expand Down Expand Up @@ -83,4 +89,7 @@ export class ForceTouchGesture extends ContinousBaseGesture<
}
}

/**
* @deprecated ForceTouch gesture is deprecated and will be removed in the future.
*/
export type ForceTouchGestureType = InstanceType<typeof ForceTouchGesture>;
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,9 @@ export const GestureObjects = {
},

/**
* #### iOS only
* @deprecated ForceTouch gesture is deprecated and will be removed in the future.
*
* #### iOS only
* A continuous gesture that recognizes force of a touch. It allows for tracking pressure of touch on some iOS devices.
* @see https://docs.swmansion.com/react-native-gesture-handler/docs/gestures/force-touch-gesture
*/
Expand Down
Loading