Skip to content

Commit a2f2d1d

Browse files
authored
Increase maximum number of tracked pointers (#3915)
## Description Gesture Handler has a limit of maximum tracked pointers that currently is set to 12. This PR increases this value to 17 (found empirically to be the limit on `iOS`). ## Test plan 1. Unfortunately I don't have 17 fingers but trust me (and @jp) bro 2. Build example app on both platforms
1 parent c54d604 commit a2f2d1d

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

packages/react-native-gesture-handler/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1014,7 +1014,7 @@ open class GestureHandler {
10141014
const val POINTER_TYPE_STYLUS = 1
10151015
const val POINTER_TYPE_MOUSE = 2
10161016
const val POINTER_TYPE_OTHER = 3
1017-
private const val MAX_POINTERS_COUNT = 12
1017+
private const val MAX_POINTERS_COUNT = 17
10181018
private lateinit var pointerProps: Array<PointerProperties?>
10191019
private lateinit var pointerCoords: Array<PointerCoords?>
10201020
private fun initPointerProps(size: Int) {

packages/react-native-gesture-handler/apple/RNGestureHandlerPointerTracker.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#import "RNGHTouchEventType.h"
33
#import "RNGHUIKit.h"
44

5-
#define MAX_POINTERS_COUNT 12
5+
#define MAX_POINTERS_COUNT 17
66

77
@class RNGestureHandler;
88

0 commit comments

Comments
 (0)