react-native-gesture-handler 2.14.1 → 2.16.0-rc.0
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +1 -0
- package/RNGestureHandler.podspec +3 -24
- package/android/build.gradle +1 -1
- package/android/paper/src/main/java/com/swmansion/gesturehandler/NativeRNGestureHandlerModuleSpec.java +55 -0
- package/android/src/main/java/com/swmansion/gesturehandler/RNGestureHandlerPackage.kt +69 -4
- package/android/src/main/java/com/swmansion/gesturehandler/core/FlingGestureHandler.kt +4 -0
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandler.kt +69 -0
- package/android/src/main/java/com/swmansion/gesturehandler/core/GestureHandlerOrchestrator.kt +37 -21
- package/android/src/main/java/com/swmansion/gesturehandler/core/LongPressGestureHandler.kt +5 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/PanGestureHandler.kt +5 -1
- package/android/src/main/java/com/swmansion/gesturehandler/core/TapGestureHandler.kt +7 -3
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerModule.kt +61 -24
- package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerRootHelper.kt +3 -2
- package/android/src/main/java/com/swmansion/gesturehandler/react/eventbuilders/GestureHandlerEventDataBuilder.kt +3 -0
- package/android/src/main/jni/cpp-adapter.cpp +18 -22
- package/{ios → apple}/Handlers/RNFlingHandler.m +29 -8
- package/{ios → apple}/Handlers/RNForceTouchHandler.m +28 -8
- package/{ios → apple}/Handlers/RNHoverHandler.m +28 -2
- package/{ios → apple}/Handlers/RNLongPressHandler.m +27 -5
- package/{ios → apple}/Handlers/RNManualHandler.m +25 -4
- package/{ios → apple}/Handlers/RNNativeViewHandler.mm +51 -13
- package/{ios → apple}/Handlers/RNPanHandler.m +106 -16
- package/apple/Handlers/RNPinchHandler.m +175 -0
- package/apple/Handlers/RNRotationHandler.m +169 -0
- package/{ios → apple}/Handlers/RNTapHandler.m +98 -26
- package/apple/RNGHUIKit.h +27 -0
- package/{ios → apple}/RNGestureHandler.h +12 -3
- package/{ios → apple}/RNGestureHandler.m +68 -7
- package/{ios → apple}/RNGestureHandlerButton.h +4 -1
- package/{ios → apple}/RNGestureHandlerButton.m +12 -4
- package/{ios → apple}/RNGestureHandlerButtonManager.m +4 -2
- package/{ios → apple}/RNGestureHandlerEvents.h +19 -10
- package/{ios → apple}/RNGestureHandlerEvents.m +29 -11
- package/{ios → apple}/RNGestureHandlerManager.h +7 -2
- package/{ios → apple}/RNGestureHandlerManager.mm +78 -17
- package/apple/RNGestureHandlerModule.h +19 -0
- package/{ios → apple}/RNGestureHandlerModule.mm +69 -69
- package/{ios → apple}/RNGestureHandlerPointerTracker.h +5 -5
- package/{ios → apple}/RNGestureHandlerPointerTracker.m +19 -14
- package/apple/RNGestureHandlerPointerType.h +8 -0
- package/{ios → apple}/RNGestureHandlerRegistry.h +1 -1
- package/{ios → apple}/RNGestureHandlerRegistry.m +1 -1
- package/{ios → apple}/RNManualActivationRecognizer.h +8 -0
- package/{ios → apple}/RNManualActivationRecognizer.m +27 -7
- package/{ios → apple}/RNRootViewGestureRecognizer.m +72 -4
- package/lib/commonjs/PointerType.js +16 -0
- package/lib/commonjs/PointerType.js.map +1 -0
- package/lib/commonjs/RNGestureHandlerModule.js +5 -18
- package/lib/commonjs/RNGestureHandlerModule.js.map +1 -1
- package/lib/commonjs/RNGestureHandlerModule.windows.js +10 -102
- package/lib/commonjs/RNGestureHandlerModule.windows.js.map +1 -1
- package/lib/commonjs/components/DrawerLayout.js +2 -0
- package/lib/commonjs/components/DrawerLayout.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.android.js +17 -2
- package/lib/commonjs/components/GestureHandlerRootView.android.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.js +15 -2
- package/lib/commonjs/components/GestureHandlerRootView.js.map +1 -1
- package/lib/commonjs/components/GestureHandlerRootView.web.js +15 -2
- package/lib/commonjs/components/GestureHandlerRootView.web.js.map +1 -1
- package/lib/commonjs/getShadowNodeFromRef.js +19 -2
- package/lib/commonjs/getShadowNodeFromRef.js.map +1 -1
- package/lib/commonjs/handlers/createHandler.js +5 -0
- package/lib/commonjs/handlers/createHandler.js.map +1 -1
- package/lib/commonjs/handlers/gestureHandlerCommon.js +1 -1
- package/lib/commonjs/handlers/gestureHandlerCommon.js.map +1 -1
- package/lib/commonjs/handlers/gestures/GestureDetector.js +11 -1
- package/lib/commonjs/handlers/gestures/GestureDetector.js.map +1 -1
- package/lib/commonjs/handlers/gestures/gesture.js +5 -0
- package/lib/commonjs/handlers/gestures/gesture.js.map +1 -1
- package/lib/commonjs/index.js +16 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js +13 -0
- package/lib/commonjs/specs/NativeRNGestureHandlerModule.js.map +1 -0
- package/lib/commonjs/web/handlers/FlingGestureHandler.js +4 -0
- package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/GestureHandler.js +19 -4
- package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js +8 -6
- package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/PanGestureHandler.js +4 -0
- package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/commonjs/web/handlers/TapGestureHandler.js +4 -0
- package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/commonjs/web/interfaces.js +12 -24
- package/lib/commonjs/web/interfaces.js.map +1 -1
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +3 -3
- package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +35 -0
- package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
- package/lib/commonjs/web/tools/NodeManager.js +3 -2
- package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
- package/lib/commonjs/web/tools/PointerEventManager.js +40 -10
- package/lib/commonjs/web/tools/PointerEventManager.js.map +1 -1
- package/lib/commonjs/web/tools/TouchEventManager.js +3 -2
- package/lib/commonjs/web/tools/TouchEventManager.js.map +1 -1
- package/lib/commonjs/web/utils.js +6 -0
- package/lib/commonjs/web/utils.js.map +1 -1
- package/lib/module/PointerType.js +9 -0
- package/lib/module/PointerType.js.map +1 -0
- package/lib/module/RNGestureHandlerModule.js +4 -18
- package/lib/module/RNGestureHandlerModule.js.map +1 -1
- package/lib/module/RNGestureHandlerModule.windows.js +10 -81
- package/lib/module/RNGestureHandlerModule.windows.js.map +1 -1
- package/lib/module/components/DrawerLayout.js +2 -0
- package/lib/module/components/DrawerLayout.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.android.js +15 -2
- package/lib/module/components/GestureHandlerRootView.android.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.js +15 -3
- package/lib/module/components/GestureHandlerRootView.js.map +1 -1
- package/lib/module/components/GestureHandlerRootView.web.js +15 -3
- package/lib/module/components/GestureHandlerRootView.web.js.map +1 -1
- package/lib/module/getShadowNodeFromRef.js +19 -2
- package/lib/module/getShadowNodeFromRef.js.map +1 -1
- package/lib/module/handlers/createHandler.js +6 -1
- package/lib/module/handlers/createHandler.js.map +1 -1
- package/lib/module/handlers/gestureHandlerCommon.js +1 -1
- package/lib/module/handlers/gestureHandlerCommon.js.map +1 -1
- package/lib/module/handlers/gestures/GestureDetector.js +11 -1
- package/lib/module/handlers/gestures/GestureDetector.js.map +1 -1
- package/lib/module/handlers/gestures/gesture.js +5 -0
- package/lib/module/handlers/gestures/gesture.js.map +1 -1
- package/lib/module/index.js +2 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/specs/NativeRNGestureHandlerModule.js +3 -0
- package/lib/module/specs/NativeRNGestureHandlerModule.js.map +1 -0
- package/lib/module/web/handlers/FlingGestureHandler.js +4 -0
- package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/GestureHandler.js +18 -4
- package/lib/module/web/handlers/GestureHandler.js.map +1 -1
- package/lib/module/web/handlers/LongPressGestureHandler.js +8 -5
- package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/PanGestureHandler.js +4 -0
- package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
- package/lib/module/web/handlers/TapGestureHandler.js +4 -0
- package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
- package/lib/module/web/interfaces.js +9 -20
- package/lib/module/web/interfaces.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerOrchestrator.js +2 -2
- package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
- package/lib/module/web/tools/GestureHandlerWebDelegate.js +34 -0
- package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
- package/lib/module/web/tools/NodeManager.js +3 -2
- package/lib/module/web/tools/NodeManager.js.map +1 -1
- package/lib/module/web/tools/PointerEventManager.js +41 -12
- package/lib/module/web/tools/PointerEventManager.js.map +1 -1
- package/lib/module/web/tools/TouchEventManager.js +2 -2
- package/lib/module/web/tools/TouchEventManager.js.map +1 -1
- package/lib/module/web/utils.js +2 -0
- package/lib/module/web/utils.js.map +1 -1
- package/lib/typescript/PointerType.d.ts +6 -0
- package/lib/typescript/RNGestureHandlerModule.d.ts +2 -13
- package/lib/typescript/RNGestureHandlerModule.windows.d.ts +5 -21
- package/lib/typescript/components/DrawerLayout.d.ts +11 -0
- package/lib/typescript/components/GestureHandlerRootView.android.d.ts +1 -1
- package/lib/typescript/components/GestureHandlerRootView.d.ts +1 -1
- package/lib/typescript/components/GestureHandlerRootView.web.d.ts +1 -1
- package/lib/typescript/getShadowNodeFromRef.d.ts +1 -1
- package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/PanGestureHandler.d.ts +1 -1
- package/lib/typescript/handlers/gestureHandlerCommon.d.ts +6 -1
- package/lib/typescript/handlers/gestures/GestureDetector.d.ts +2 -1
- package/lib/typescript/handlers/gestures/gesture.d.ts +2 -0
- package/lib/typescript/index.d.ts +2 -0
- package/lib/typescript/specs/NativeRNGestureHandlerModule.d.ts +14 -0
- package/lib/typescript/web/handlers/GestureHandler.d.ts +4 -1
- package/lib/typescript/web/interfaces.d.ts +10 -14
- package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +2 -0
- package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +7 -0
- package/lib/typescript/web/tools/PointerEventManager.d.ts +2 -0
- package/lib/typescript/web/utils.d.ts +2 -0
- package/package.json +14 -11
- package/src/PointerType.ts +6 -0
- package/src/RNGestureHandlerModule.ts +4 -49
- package/src/RNGestureHandlerModule.windows.ts +18 -100
- package/src/components/DrawerLayout.tsx +15 -0
- package/src/components/GestureHandlerRootView.android.tsx +13 -5
- package/src/components/GestureHandlerRootView.tsx +10 -5
- package/src/components/GestureHandlerRootView.web.tsx +10 -5
- package/src/getShadowNodeFromRef.ts +28 -6
- package/src/handlers/createHandler.tsx +6 -0
- package/src/handlers/gestureHandlerCommon.ts +7 -0
- package/src/handlers/gestures/GestureDetector.tsx +16 -2
- package/src/handlers/gestures/gesture.ts +6 -0
- package/src/index.ts +2 -0
- package/src/specs/NativeRNGestureHandlerModule.ts +26 -0
- package/src/web/handlers/FlingGestureHandler.ts +4 -0
- package/src/web/handlers/GestureHandler.ts +20 -2
- package/src/web/handlers/LongPressGestureHandler.ts +8 -5
- package/src/web/handlers/PanGestureHandler.ts +4 -0
- package/src/web/handlers/TapGestureHandler.ts +4 -0
- package/src/web/interfaces.ts +12 -17
- package/src/web/tools/GestureHandlerDelegate.ts +3 -0
- package/src/web/tools/GestureHandlerOrchestrator.ts +2 -2
- package/src/web/tools/GestureHandlerWebDelegate.ts +39 -0
- package/src/web/tools/NodeManager.ts +5 -1
- package/src/web/tools/PointerEventManager.ts +46 -10
- package/src/web/tools/TouchEventManager.ts +2 -8
- package/src/web/utils.ts +9 -0
- package/ios/Handlers/RNPinchHandler.m +0 -95
- package/ios/Handlers/RNRotationHandler.m +0 -93
- package/ios/RNGestureHandlerModule.h +0 -7
- package/lib/commonjs/RNGestureHandlerModule.macos.js +0 -149
- package/lib/commonjs/RNGestureHandlerModule.macos.js.map +0 -1
- package/lib/module/RNGestureHandlerModule.macos.js +0 -110
- package/lib/module/RNGestureHandlerModule.macos.js.map +0 -1
- package/lib/typescript/RNGestureHandlerModule.macos.d.ts +0 -47
- package/src/RNGestureHandlerModule.macos.ts +0 -133
- /package/{ios → apple}/Handlers/RNFlingHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNForceTouchHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNHoverHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNLongPressHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNManualHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNNativeViewHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNPanHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNPinchHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNRotationHandler.h +0 -0
- /package/{ios → apple}/Handlers/RNTapHandler.h +0 -0
- /package/{ios → apple}/RNGHTouchEventType.h +0 -0
- /package/{ios → apple}/RNGestureHandler.xcodeproj/project.pbxproj +0 -0
- /package/{ios → apple}/RNGestureHandler.xcodeproj/project.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist +0 -0
- /package/{ios → apple}/RNGestureHandlerActionType.h +0 -0
- /package/{ios → apple}/RNGestureHandlerButtonComponentView.h +0 -0
- /package/{ios → apple}/RNGestureHandlerButtonComponentView.mm +0 -0
- /package/{ios → apple}/RNGestureHandlerButtonManager.h +0 -0
- /package/{ios → apple}/RNGestureHandlerDirection.h +0 -0
- /package/{ios → apple}/RNGestureHandlerRootViewComponentView.mm +0 -0
- /package/{ios → apple}/RNGestureHandlerState.h +0 -0
- /package/{ios → apple}/RNGestureHandlerStateManager.h +0 -0
- /package/{ios → apple}/RNRootViewGestureRecognizer.h +0 -0
@@ -5,7 +5,7 @@
|
|
5
5
|
|
6
6
|
@implementation RNGestureHandlerPointerTracker {
|
7
7
|
__weak RNGestureHandler *_gestureHandler;
|
8
|
-
|
8
|
+
RNGHUITouch *_trackedPointers[MAX_POINTERS_COUNT];
|
9
9
|
int _trackedPointersCount;
|
10
10
|
}
|
11
11
|
|
@@ -23,7 +23,7 @@
|
|
23
23
|
return self;
|
24
24
|
}
|
25
25
|
|
26
|
-
- (int)registerTouch:(
|
26
|
+
- (int)registerTouch:(RNGHUITouch *)touch
|
27
27
|
{
|
28
28
|
for (int index = 0; index < MAX_POINTERS_COUNT; index++) {
|
29
29
|
if (_trackedPointers[index] == nil) {
|
@@ -35,7 +35,7 @@
|
|
35
35
|
return -1;
|
36
36
|
}
|
37
37
|
|
38
|
-
- (int)unregisterTouch:(
|
38
|
+
- (int)unregisterTouch:(RNGHUITouch *)touch
|
39
39
|
{
|
40
40
|
for (int index = 0; index < MAX_POINTERS_COUNT; index++) {
|
41
41
|
if (_trackedPointers[index] == touch) {
|
@@ -47,7 +47,7 @@
|
|
47
47
|
return -1;
|
48
48
|
}
|
49
49
|
|
50
|
-
- (int)findTouchIndex:(
|
50
|
+
- (int)findTouchIndex:(RNGHUITouch *)touch
|
51
51
|
{
|
52
52
|
for (int index = 0; index < MAX_POINTERS_COUNT; index++) {
|
53
53
|
if (_trackedPointers[index] == touch) {
|
@@ -68,10 +68,15 @@
|
|
68
68
|
return count;
|
69
69
|
}
|
70
70
|
|
71
|
-
- (NSDictionary *)extractPointerData:(int)index forTouch:(
|
71
|
+
- (NSDictionary *)extractPointerData:(int)index forTouch:(RNGHUITouch *)touch
|
72
72
|
{
|
73
|
+
#if TARGET_OS_OSX
|
74
|
+
CGPoint absolutePos = [touch locationInWindow];
|
75
|
+
CGPoint relativePos = [touch.window.contentView convertPoint:absolutePos fromView:_gestureHandler.recognizer.view];
|
76
|
+
#else
|
73
77
|
CGPoint relativePos = [touch locationInView:_gestureHandler.recognizer.view];
|
74
78
|
CGPoint absolutePos = [touch locationInView:_gestureHandler.recognizer.view.window];
|
79
|
+
#endif
|
75
80
|
|
76
81
|
return @{
|
77
82
|
@"id" : @(index),
|
@@ -90,7 +95,7 @@
|
|
90
95
|
int nextIndex = 0;
|
91
96
|
|
92
97
|
for (int i = 0; i < MAX_POINTERS_COUNT; i++) {
|
93
|
-
|
98
|
+
RNGHUITouch *touch = _trackedPointers[i];
|
94
99
|
if (touch != nil) {
|
95
100
|
data[nextIndex++] = [self extractPointerData:i forTouch:touch];
|
96
101
|
}
|
@@ -99,7 +104,7 @@
|
|
99
104
|
_allPointersData = [[NSArray alloc] initWithObjects:data count:registeredTouches];
|
100
105
|
}
|
101
106
|
|
102
|
-
- (void)touchesBegan:(NSSet<
|
107
|
+
- (void)touchesBegan:(NSSet<RNGHUITouch *> *)touches withEvent:(UIEvent *)event
|
103
108
|
{
|
104
109
|
if (!_gestureHandler.needsPointerData) {
|
105
110
|
return;
|
@@ -110,7 +115,7 @@
|
|
110
115
|
NSDictionary *data[touches.count];
|
111
116
|
|
112
117
|
for (int i = 0; i < [touches count]; i++) {
|
113
|
-
|
118
|
+
RNGHUITouch *touch = [[touches allObjects] objectAtIndex:i];
|
114
119
|
int index = [self registerTouch:touch];
|
115
120
|
if (index >= 0) {
|
116
121
|
_trackedPointersCount++;
|
@@ -125,7 +130,7 @@
|
|
125
130
|
[self sendEvent];
|
126
131
|
}
|
127
132
|
|
128
|
-
- (void)touchesMoved:(NSSet<
|
133
|
+
- (void)touchesMoved:(NSSet<RNGHUITouch *> *)touches withEvent:(UIEvent *)event
|
129
134
|
{
|
130
135
|
if (!_gestureHandler.needsPointerData) {
|
131
136
|
return;
|
@@ -136,7 +141,7 @@
|
|
136
141
|
NSDictionary *data[touches.count];
|
137
142
|
|
138
143
|
for (int i = 0; i < [touches count]; i++) {
|
139
|
-
|
144
|
+
RNGHUITouch *touch = [[touches allObjects] objectAtIndex:i];
|
140
145
|
int index = [self findTouchIndex:touch];
|
141
146
|
data[i] = [self extractPointerData:index forTouch:touch];
|
142
147
|
}
|
@@ -146,7 +151,7 @@
|
|
146
151
|
[self sendEvent];
|
147
152
|
}
|
148
153
|
|
149
|
-
- (void)touchesEnded:(NSSet<
|
154
|
+
- (void)touchesEnded:(NSSet<RNGHUITouch *> *)touches withEvent:(UIEvent *)event
|
150
155
|
{
|
151
156
|
if (!_gestureHandler.needsPointerData) {
|
152
157
|
return;
|
@@ -160,7 +165,7 @@
|
|
160
165
|
NSDictionary *data[touches.count];
|
161
166
|
|
162
167
|
for (int i = 0; i < [touches count]; i++) {
|
163
|
-
|
168
|
+
RNGHUITouch *touch = [[touches allObjects] objectAtIndex:i];
|
164
169
|
int index = [self unregisterTouch:touch];
|
165
170
|
if (index >= 0) {
|
166
171
|
_trackedPointersCount--;
|
@@ -173,7 +178,7 @@
|
|
173
178
|
[self sendEvent];
|
174
179
|
}
|
175
180
|
|
176
|
-
- (void)touchesCancelled:(NSSet<
|
181
|
+
- (void)touchesCancelled:(NSSet<RNGHUITouch *> *)touches withEvent:(UIEvent *)event
|
177
182
|
{
|
178
183
|
if (!_gestureHandler.needsPointerData) {
|
179
184
|
return;
|
@@ -213,7 +218,7 @@
|
|
213
218
|
NSDictionary *data[registeredTouches];
|
214
219
|
|
215
220
|
for (int i = 0; i < MAX_POINTERS_COUNT; i++) {
|
216
|
-
|
221
|
+
RNGHUITouch *touch = _trackedPointers[i];
|
217
222
|
if (touch != nil) {
|
218
223
|
data[nextIndex++] = [self extractPointerData:i forTouch:touch];
|
219
224
|
[self unregisterTouch:touch];
|
@@ -13,7 +13,7 @@
|
|
13
13
|
- (nullable RNGestureHandler *)handlerWithTag:(nonnull NSNumber *)handlerTag;
|
14
14
|
- (void)registerGestureHandler:(nonnull RNGestureHandler *)gestureHandler;
|
15
15
|
- (void)attachHandlerWithTag:(nonnull NSNumber *)handlerTag
|
16
|
-
toView:(nonnull
|
16
|
+
toView:(nonnull RNGHUIView *)view
|
17
17
|
withActionType:(RNGestureHandlerActionType)actionType;
|
18
18
|
- (void)dropHandlerWithTag:(nonnull NSNumber *)handlerTag;
|
19
19
|
- (void)dropAllHandlers;
|
@@ -1,8 +1,16 @@
|
|
1
|
+
#if !TARGET_OS_OSX
|
1
2
|
#import <UIKit/UIGestureRecognizerSubclass.h>
|
3
|
+
#else
|
4
|
+
#import <Appkit/NSGestureRecognizer.h>
|
5
|
+
#endif
|
2
6
|
|
3
7
|
@class RNGestureHandler;
|
4
8
|
|
9
|
+
#if !TARGET_OS_OSX
|
5
10
|
@interface RNManualActivationRecognizer : UIGestureRecognizer <UIGestureRecognizerDelegate>
|
11
|
+
#else
|
12
|
+
@interface RNManualActivationRecognizer : NSGestureRecognizer <NSGestureRecognizerDelegate>
|
13
|
+
#endif
|
6
14
|
|
7
15
|
- (id)initWithGestureHandler:(RNGestureHandler *)gestureHandler;
|
8
16
|
- (void)fail;
|
@@ -12,7 +12,9 @@
|
|
12
12
|
_handler = gestureHandler;
|
13
13
|
_activePointers = 0;
|
14
14
|
self.delegate = self;
|
15
|
+
#if !TARGET_OS_OSX
|
15
16
|
self.cancelsTouchesInView = NO;
|
17
|
+
#endif
|
16
18
|
}
|
17
19
|
return self;
|
18
20
|
}
|
@@ -25,19 +27,35 @@
|
|
25
27
|
}
|
26
28
|
}
|
27
29
|
|
28
|
-
|
30
|
+
#if TARGET_OS_OSX
|
31
|
+
- (void)mouseUp:(NSEvent *)event
|
29
32
|
{
|
30
|
-
[super
|
33
|
+
[super mouseUp:event];
|
31
34
|
|
32
|
-
_activePointers
|
35
|
+
_activePointers -= 1;
|
33
36
|
}
|
34
37
|
|
35
|
-
- (void)
|
38
|
+
- (void)mouseDown:(NSEvent *)event
|
36
39
|
{
|
37
|
-
[super
|
40
|
+
[super mouseDown:event];
|
41
|
+
|
42
|
+
_activePointers += 1;
|
43
|
+
|
44
|
+
if (_activePointers == 0) {
|
45
|
+
self.state = UIGestureRecognizerStateBegan;
|
46
|
+
}
|
38
47
|
}
|
39
48
|
|
40
|
-
|
49
|
+
#else
|
50
|
+
|
51
|
+
- (void)touchesBegan:(NSSet<RNGHUITouch *> *)touches withEvent:(UIEvent *)event
|
52
|
+
{
|
53
|
+
[super touchesBegan:touches withEvent:event];
|
54
|
+
|
55
|
+
_activePointers += touches.count;
|
56
|
+
}
|
57
|
+
|
58
|
+
- (void)touchesEnded:(NSSet<RNGHUITouch *> *)touches withEvent:(UIEvent *)event
|
41
59
|
{
|
42
60
|
[super touchesEnded:touches withEvent:event];
|
43
61
|
|
@@ -48,7 +66,7 @@
|
|
48
66
|
}
|
49
67
|
}
|
50
68
|
|
51
|
-
- (void)touchesCancelled:(NSSet<
|
69
|
+
- (void)touchesCancelled:(NSSet<RNGHUITouch *> *)touches withEvent:(UIEvent *)event
|
52
70
|
{
|
53
71
|
[super touchesCancelled:touches withEvent:event];
|
54
72
|
|
@@ -56,6 +74,8 @@
|
|
56
74
|
[self reset];
|
57
75
|
}
|
58
76
|
|
77
|
+
#endif
|
78
|
+
|
59
79
|
- (void)reset
|
60
80
|
{
|
61
81
|
self.enabled = YES;
|
@@ -8,7 +8,9 @@
|
|
8
8
|
|
9
9
|
#import "RNRootViewGestureRecognizer.h"
|
10
10
|
|
11
|
+
#if !TARGET_OS_OSX
|
11
12
|
#import <UIKit/UIGestureRecognizerSubclass.h>
|
13
|
+
#endif
|
12
14
|
|
13
15
|
#ifdef RCT_NEW_ARCH_ENABLED
|
14
16
|
#import <React/RCTSurfaceTouchHandler.h>
|
@@ -24,10 +26,14 @@
|
|
24
26
|
|
25
27
|
- (instancetype)init
|
26
28
|
{
|
29
|
+
#if !TARGET_OS_OSX
|
27
30
|
if (self = [super init]) {
|
28
31
|
self.delaysTouchesEnded = NO;
|
29
32
|
self.delaysTouchesBegan = NO;
|
30
33
|
}
|
34
|
+
#else
|
35
|
+
self = [super init];
|
36
|
+
#endif
|
31
37
|
return self;
|
32
38
|
}
|
33
39
|
|
@@ -67,18 +73,18 @@
|
|
67
73
|
return [super canBePreventedByGestureRecognizer:preventingGestureRecognizer];
|
68
74
|
}
|
69
75
|
|
70
|
-
- (void)
|
76
|
+
- (void)interactionsBegan:(NSSet *)touches withEvent:(UIEvent *)event
|
71
77
|
{
|
72
78
|
_active = YES;
|
73
79
|
self.state = UIGestureRecognizerStatePossible;
|
74
80
|
}
|
75
81
|
|
76
|
-
- (void)
|
82
|
+
- (void)interactionsMoved:(NSSet *)touches withEvent:(UIEvent *)event
|
77
83
|
{
|
78
84
|
self.state = UIGestureRecognizerStatePossible;
|
79
85
|
}
|
80
86
|
|
81
|
-
- (void)
|
87
|
+
- (void)interactionsEnded:(NSSet *)touches withEvent:(UIEvent *)event
|
82
88
|
{
|
83
89
|
if (self.state == UIGestureRecognizerStateBegan || self.state == UIGestureRecognizerStateChanged) {
|
84
90
|
self.state = UIGestureRecognizerStateEnded;
|
@@ -89,13 +95,75 @@
|
|
89
95
|
_active = NO;
|
90
96
|
}
|
91
97
|
|
92
|
-
- (void)
|
98
|
+
- (void)interactionsCancelled:(NSSet *)touches withEvent:(UIEvent *)event
|
93
99
|
{
|
94
100
|
self.state = UIGestureRecognizerStateCancelled;
|
95
101
|
[self reset];
|
96
102
|
_active = NO;
|
97
103
|
}
|
98
104
|
|
105
|
+
#if TARGET_OS_OSX
|
106
|
+
- (void)mouseDown:(NSEvent *)event
|
107
|
+
{
|
108
|
+
[super mouseDown:event];
|
109
|
+
[self interactionsBegan:[NSSet setWithObject:event] withEvent:event];
|
110
|
+
}
|
111
|
+
|
112
|
+
- (void)rightMouseDown:(NSEvent *)event
|
113
|
+
{
|
114
|
+
[super rightMouseDown:event];
|
115
|
+
[self interactionsBegan:[NSSet setWithObject:event] withEvent:event];
|
116
|
+
}
|
117
|
+
|
118
|
+
- (void)mouseDragged:(NSEvent *)event
|
119
|
+
{
|
120
|
+
[super mouseDragged:event];
|
121
|
+
[self interactionsMoved:[NSSet setWithObject:event] withEvent:event];
|
122
|
+
}
|
123
|
+
|
124
|
+
- (void)rightMouseDragged:(NSEvent *)event
|
125
|
+
{
|
126
|
+
[super rightMouseDragged:event];
|
127
|
+
[self interactionsMoved:[NSSet setWithObject:event] withEvent:event];
|
128
|
+
}
|
129
|
+
|
130
|
+
- (void)mouseUp:(NSEvent *)event
|
131
|
+
{
|
132
|
+
[super mouseUp:event];
|
133
|
+
[self interactionsEnded:[NSSet setWithObject:event] withEvent:event];
|
134
|
+
}
|
135
|
+
|
136
|
+
- (void)rightMouseUp:(NSEvent *)event
|
137
|
+
{
|
138
|
+
[super rightMouseUp:event];
|
139
|
+
[self interactionsEnded:[NSSet setWithObject:event] withEvent:event];
|
140
|
+
}
|
141
|
+
#else
|
142
|
+
- (void)touchesBegan:(NSSet<RNGHUITouch *> *)touches withEvent:(UIEvent *)event
|
143
|
+
{
|
144
|
+
[super touchesBegan:touches withEvent:event];
|
145
|
+
[self interactionsBegan:[NSSet setWithObject:event] withEvent:event];
|
146
|
+
}
|
147
|
+
|
148
|
+
- (void)touchesMoved:(NSSet<RNGHUITouch *> *)touches withEvent:(UIEvent *)event
|
149
|
+
{
|
150
|
+
[super touchesMoved:touches withEvent:event];
|
151
|
+
[self interactionsMoved:[NSSet setWithObject:event] withEvent:event];
|
152
|
+
}
|
153
|
+
|
154
|
+
- (void)touchesEnded:(NSSet<RNGHUITouch *> *)touches withEvent:(UIEvent *)event
|
155
|
+
{
|
156
|
+
[super touchesEnded:touches withEvent:event];
|
157
|
+
[self interactionsEnded:[NSSet setWithObject:event] withEvent:event];
|
158
|
+
}
|
159
|
+
|
160
|
+
- (void)touchesCancelled:(NSSet<RNGHUITouch *> *)touches withEvent:(UIEvent *)event
|
161
|
+
{
|
162
|
+
[super touchesCancelled:touches withEvent:event];
|
163
|
+
[self interactionsCancelled:[NSSet setWithObject:event] withEvent:event];
|
164
|
+
}
|
165
|
+
#endif
|
166
|
+
|
99
167
|
- (void)blockOtherRecognizers
|
100
168
|
{
|
101
169
|
if (_active) {
|
@@ -0,0 +1,16 @@
|
|
1
|
+
"use strict";
|
2
|
+
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
4
|
+
value: true
|
5
|
+
});
|
6
|
+
exports.PointerType = void 0;
|
7
|
+
let PointerType;
|
8
|
+
exports.PointerType = PointerType;
|
9
|
+
|
10
|
+
(function (PointerType) {
|
11
|
+
PointerType[PointerType["TOUCH"] = 0] = "TOUCH";
|
12
|
+
PointerType[PointerType["STYLUS"] = 1] = "STYLUS";
|
13
|
+
PointerType[PointerType["MOUSE"] = 2] = "MOUSE";
|
14
|
+
PointerType[PointerType["OTHER"] = 3] = "OTHER";
|
15
|
+
})(PointerType || (exports.PointerType = PointerType = {}));
|
16
|
+
//# sourceMappingURL=PointerType.js.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"sources":["PointerType.ts"],"names":["PointerType"],"mappings":";;;;;;IAAYA,W;;;WAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;AAAAA,EAAAA,W,CAAAA,W;GAAAA,W,2BAAAA,W","sourcesContent":["export enum PointerType {\n TOUCH,\n STYLUS,\n MOUSE,\n OTHER,\n}\n"]}
|
@@ -5,25 +5,12 @@ Object.defineProperty(exports, "__esModule", {
|
|
5
5
|
});
|
6
6
|
exports.default = void 0;
|
7
7
|
|
8
|
-
var
|
8
|
+
var _NativeRNGestureHandlerModule = _interopRequireDefault(require("./specs/NativeRNGestureHandlerModule"));
|
9
9
|
|
10
|
-
|
10
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
if (RNGestureHandlerModule == null) {
|
17
|
-
console.error((0, _utils.tagMessage)(`react-native-gesture-handler module was not found. Make sure you're running your app on the native platform and your code is linked properly (cd ios && pod install && cd ..).
|
18
|
-
|
19
|
-
For installation instructions, please refer to https://docs.swmansion.com/react-native-gesture-handler/docs/#installation`.split('\n').map(line => line.trim()).join('\n')));
|
20
|
-
}
|
21
|
-
|
22
|
-
if (RNGestureHandlerModule && RNGestureHandlerModule.flushOperations === undefined) {
|
23
|
-
RNGestureHandlerModule.flushOperations = () => {// NO-OP if not defined
|
24
|
-
};
|
25
|
-
}
|
26
|
-
|
27
|
-
var _default = RNGestureHandlerModule;
|
12
|
+
// Reexport the native module spec used by codegen. The relevant files are inluded on Android
|
13
|
+
// to ensure the compatibility with the old arch, while iOS doesn't require those at all.
|
14
|
+
var _default = _NativeRNGestureHandlerModule.default;
|
28
15
|
exports.default = _default;
|
29
16
|
//# sourceMappingURL=RNGestureHandlerModule.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["RNGestureHandlerModule.ts"],"names":["
|
1
|
+
{"version":3,"sources":["RNGestureHandlerModule.ts"],"names":["Module"],"mappings":";;;;;;;AAGA;;;;AAHA;AACA;eAGeA,qC","sourcesContent":["// Reexport the native module spec used by codegen. The relevant files are inluded on Android\n// to ensure the compatibility with the old arch, while iOS doesn't require those at all.\n\nimport Module from './specs/NativeRNGestureHandlerModule';\nexport default Module;\n"]}
|
@@ -3,15 +3,7 @@
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
4
4
|
value: true
|
5
5
|
});
|
6
|
-
exports.default = exports.
|
7
|
-
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
9
|
-
|
10
|
-
var _EnableNewWebImplementation = require("./EnableNewWebImplementation");
|
11
|
-
|
12
|
-
var _InteractionManager = _interopRequireDefault(require("./web/tools/InteractionManager"));
|
13
|
-
|
14
|
-
var _NodeManager = _interopRequireDefault(require("./web/tools/NodeManager"));
|
6
|
+
exports.default = exports.Gestures = void 0;
|
15
7
|
|
16
8
|
var _PanGestureHandler = _interopRequireDefault(require("./web/handlers/PanGestureHandler"));
|
17
9
|
|
@@ -29,32 +21,9 @@ var _NativeViewGestureHandler = _interopRequireDefault(require("./web/handlers/N
|
|
29
21
|
|
30
22
|
var _ManualGestureHandler = _interopRequireDefault(require("./web/handlers/ManualGestureHandler"));
|
31
23
|
|
32
|
-
var HammerNodeManager = _interopRequireWildcard(require("./web_hammer/NodeManager"));
|
33
|
-
|
34
|
-
var _NativeViewGestureHandler2 = _interopRequireDefault(require("./web_hammer/NativeViewGestureHandler"));
|
35
|
-
|
36
|
-
var _PanGestureHandler2 = _interopRequireDefault(require("./web_hammer/PanGestureHandler"));
|
37
|
-
|
38
|
-
var _TapGestureHandler2 = _interopRequireDefault(require("./web_hammer/TapGestureHandler"));
|
39
|
-
|
40
|
-
var _LongPressGestureHandler2 = _interopRequireDefault(require("./web_hammer/LongPressGestureHandler"));
|
41
|
-
|
42
|
-
var _PinchGestureHandler2 = _interopRequireDefault(require("./web_hammer/PinchGestureHandler"));
|
43
|
-
|
44
|
-
var _RotationGestureHandler2 = _interopRequireDefault(require("./web_hammer/RotationGestureHandler"));
|
45
|
-
|
46
|
-
var _FlingGestureHandler2 = _interopRequireDefault(require("./web_hammer/FlingGestureHandler"));
|
47
|
-
|
48
|
-
var _GestureHandlerWebDelegate = require("./web/tools/GestureHandlerWebDelegate");
|
49
|
-
|
50
|
-
function _getRequireWildcardCache() { if (typeof WeakMap !== "function") return null; var cache = new WeakMap(); _getRequireWildcardCache = function () { return cache; }; return cache; }
|
51
|
-
|
52
|
-
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
53
|
-
|
54
24
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
55
25
|
|
56
|
-
//GestureHandlers
|
57
|
-
//Hammer Handlers
|
26
|
+
// GestureHandlers
|
58
27
|
const Gestures = {
|
59
28
|
NativeViewGestureHandler: _NativeViewGestureHandler.default,
|
60
29
|
PanGestureHandler: _PanGestureHandler.default,
|
@@ -66,16 +35,6 @@ const Gestures = {
|
|
66
35
|
ManualGestureHandler: _ManualGestureHandler.default
|
67
36
|
};
|
68
37
|
exports.Gestures = Gestures;
|
69
|
-
const HammerGestures = {
|
70
|
-
NativeViewGestureHandler: _NativeViewGestureHandler2.default,
|
71
|
-
PanGestureHandler: _PanGestureHandler2.default,
|
72
|
-
TapGestureHandler: _TapGestureHandler2.default,
|
73
|
-
LongPressGestureHandler: _LongPressGestureHandler2.default,
|
74
|
-
PinchGestureHandler: _PinchGestureHandler2.default,
|
75
|
-
RotationGestureHandler: _RotationGestureHandler2.default,
|
76
|
-
FlingGestureHandler: _FlingGestureHandler2.default
|
77
|
-
};
|
78
|
-
exports.HammerGestures = HammerGestures;
|
79
38
|
var _default = {
|
80
39
|
handleSetJSResponder(_tag, _blockNativeResponder) {// NO-OP
|
81
40
|
},
|
@@ -83,75 +42,24 @@ var _default = {
|
|
83
42
|
handleClearJSResponder() {// NO-OP
|
84
43
|
},
|
85
44
|
|
86
|
-
createGestureHandler(
|
87
|
-
if ((0, _EnableNewWebImplementation.isNewWebImplementationEnabled)()) {
|
88
|
-
if (!(handlerName in Gestures)) {
|
89
|
-
throw new Error(`react-native-gesture-handler: ${handlerName} is not supported on web.`);
|
90
|
-
}
|
91
|
-
|
92
|
-
const GestureClass = Gestures[handlerName];
|
93
|
-
|
94
|
-
_NodeManager.default.createGestureHandler(handlerTag, new GestureClass(new _GestureHandlerWebDelegate.GestureHandlerWebDelegate()));
|
95
|
-
|
96
|
-
_InteractionManager.default.getInstance().configureInteractions(_NodeManager.default.getHandler(handlerTag), config);
|
97
|
-
} else {
|
98
|
-
if (!(handlerName in HammerGestures)) {
|
99
|
-
throw new Error(`react-native-gesture-handler: ${handlerName} is not supported on web.`);
|
100
|
-
} // @ts-ignore If it doesn't exist, the error is thrown
|
101
|
-
// eslint-disable-next-line @typescript-eslint/no-unsafe-assignment
|
102
|
-
|
103
|
-
|
104
|
-
const GestureClass = HammerGestures[handlerName]; // eslint-disable-next-line @typescript-eslint/no-unsafe-call
|
105
|
-
|
106
|
-
HammerNodeManager.createGestureHandler(handlerTag, new GestureClass());
|
107
|
-
}
|
108
|
-
|
109
|
-
this.updateGestureHandler(handlerTag, config);
|
45
|
+
createGestureHandler(_handlerName, _handlerTag, _config) {// NO-OP
|
110
46
|
},
|
111
47
|
|
112
|
-
attachGestureHandler(
|
113
|
-
|
114
|
-
if (!(newView instanceof HTMLElement || newView instanceof _react.default.Component)) {
|
115
|
-
return;
|
116
|
-
}
|
117
|
-
|
118
|
-
if ((0, _EnableNewWebImplementation.isNewWebImplementationEnabled)()) {
|
119
|
-
//@ts-ignore Types should be HTMLElement or React.Component
|
120
|
-
_NodeManager.default.getHandler(handlerTag).init(newView, propsRef);
|
121
|
-
} else {
|
122
|
-
//@ts-ignore Types should be HTMLElement or React.Component
|
123
|
-
HammerNodeManager.getHandler(handlerTag).setView(newView, propsRef);
|
124
|
-
}
|
48
|
+
attachGestureHandler(_handlerTag, // eslint-disable-next-line @typescript-eslint/no-explicit-any
|
49
|
+
_newView, _actionType, _propsRef) {// NO-OP
|
125
50
|
},
|
126
51
|
|
127
|
-
updateGestureHandler(
|
128
|
-
if ((0, _EnableNewWebImplementation.isNewWebImplementationEnabled)()) {
|
129
|
-
_NodeManager.default.getHandler(handlerTag).updateGestureConfig(newConfig);
|
130
|
-
|
131
|
-
_InteractionManager.default.getInstance().configureInteractions(_NodeManager.default.getHandler(handlerTag), newConfig);
|
132
|
-
} else {
|
133
|
-
HammerNodeManager.getHandler(handlerTag).updateGestureConfig(newConfig);
|
134
|
-
}
|
52
|
+
updateGestureHandler(_handlerTag, _newConfig) {// NO-OP
|
135
53
|
},
|
136
54
|
|
137
|
-
getGestureHandlerNode(
|
138
|
-
if ((0, _EnableNewWebImplementation.isNewWebImplementationEnabled)()) {
|
139
|
-
return _NodeManager.default.getHandler(handlerTag);
|
140
|
-
} else {
|
141
|
-
return HammerNodeManager.getHandler(handlerTag);
|
142
|
-
}
|
55
|
+
getGestureHandlerNode(_handlerTag) {// NO-OP
|
143
56
|
},
|
144
57
|
|
145
|
-
dropGestureHandler(
|
146
|
-
if ((0, _EnableNewWebImplementation.isNewWebImplementationEnabled)()) {
|
147
|
-
_NodeManager.default.dropGestureHandler(handlerTag);
|
148
|
-
} else {
|
149
|
-
HammerNodeManager.dropGestureHandler(handlerTag);
|
150
|
-
}
|
58
|
+
dropGestureHandler(_handlerTag) {// NO-OP
|
151
59
|
},
|
152
60
|
|
153
|
-
//
|
154
|
-
|
61
|
+
flushOperations() {// NO-OP
|
62
|
+
}
|
155
63
|
|
156
64
|
};
|
157
65
|
exports.default = _default;
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"sources":["RNGestureHandlerModule.windows.ts"],"names":["Gestures","NativeViewGestureHandler","PanGestureHandler","TapGestureHandler","LongPressGestureHandler","PinchGestureHandler","RotationGestureHandler","FlingGestureHandler","ManualGestureHandler","
|
1
|
+
{"version":3,"sources":["RNGestureHandlerModule.windows.ts"],"names":["Gestures","NativeViewGestureHandler","PanGestureHandler","TapGestureHandler","LongPressGestureHandler","PinchGestureHandler","RotationGestureHandler","FlingGestureHandler","ManualGestureHandler","handleSetJSResponder","_tag","_blockNativeResponder","handleClearJSResponder","createGestureHandler","_handlerName","_handlerTag","_config","attachGestureHandler","_newView","_actionType","_propsRef","updateGestureHandler","_newConfig","getGestureHandlerNode","dropGestureHandler","flushOperations"],"mappings":";;;;;;;AAKA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;;;AARA;AAWO,MAAMA,QAAQ,GAAG;AACtBC,EAAAA,wBAAwB,EAAxBA,iCADsB;AAEtBC,EAAAA,iBAAiB,EAAjBA,0BAFsB;AAGtBC,EAAAA,iBAAiB,EAAjBA,0BAHsB;AAItBC,EAAAA,uBAAuB,EAAvBA,gCAJsB;AAKtBC,EAAAA,mBAAmB,EAAnBA,4BALsB;AAMtBC,EAAAA,sBAAsB,EAAtBA,+BANsB;AAOtBC,EAAAA,mBAAmB,EAAnBA,4BAPsB;AAQtBC,EAAAA,oBAAoB,EAApBA;AARsB,CAAjB;;eAWQ;AACbC,EAAAA,oBAAoB,CAACC,IAAD,EAAeC,qBAAf,EAA+C,CACjE;AACD,GAHY;;AAIbC,EAAAA,sBAAsB,GAAG,CACvB;AACD,GANY;;AAObC,EAAAA,oBAAoB,CAClBC,YADkB,EAElBC,WAFkB,EAGlBC,OAHkB,EAIlB,CACA;AACD,GAbY;;AAcbC,EAAAA,oBAAoB,CAClBF,WADkB,EAElB;AACAG,EAAAA,QAHkB,EAIlBC,WAJkB,EAKlBC,SALkB,EAMlB,CACA;AACD,GAtBY;;AAuBbC,EAAAA,oBAAoB,CAACN,WAAD,EAAsBO,UAAtB,EAA0C,CAC5D;AACD,GAzBY;;AA0BbC,EAAAA,qBAAqB,CAACR,WAAD,EAAsB,CACzC;AACD,GA5BY;;AA6BbS,EAAAA,kBAAkB,CAACT,WAAD,EAAsB,CACtC;AACD,GA/BY;;AAgCbU,EAAAA,eAAe,GAAG,CAChB;AACD;;AAlCY,C","sourcesContent":["import React from 'react';\n\nimport { ActionType } from './ActionType';\n\n// GestureHandlers\nimport PanGestureHandler from './web/handlers/PanGestureHandler';\nimport TapGestureHandler from './web/handlers/TapGestureHandler';\nimport LongPressGestureHandler from './web/handlers/LongPressGestureHandler';\nimport PinchGestureHandler from './web/handlers/PinchGestureHandler';\nimport RotationGestureHandler from './web/handlers/RotationGestureHandler';\nimport FlingGestureHandler from './web/handlers/FlingGestureHandler';\nimport NativeViewGestureHandler from './web/handlers/NativeViewGestureHandler';\nimport ManualGestureHandler from './web/handlers/ManualGestureHandler';\nimport { Config } from './web/interfaces';\n\nexport const Gestures = {\n NativeViewGestureHandler,\n PanGestureHandler,\n TapGestureHandler,\n LongPressGestureHandler,\n PinchGestureHandler,\n RotationGestureHandler,\n FlingGestureHandler,\n ManualGestureHandler,\n};\n\nexport default {\n handleSetJSResponder(_tag: number, _blockNativeResponder: boolean) {\n // NO-OP\n },\n handleClearJSResponder() {\n // NO-OP\n },\n createGestureHandler<T>(\n _handlerName: keyof typeof Gestures,\n _handlerTag: number,\n _config: T\n ) {\n // NO-OP\n },\n attachGestureHandler(\n _handlerTag: number,\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n _newView: any,\n _actionType: ActionType,\n _propsRef: React.RefObject<unknown>\n ) {\n // NO-OP\n },\n updateGestureHandler(_handlerTag: number, _newConfig: Config) {\n // NO-OP\n },\n getGestureHandlerNode(_handlerTag: number) {\n // NO-OP\n },\n dropGestureHandler(_handlerTag: number) {\n // NO-OP\n },\n flushOperations() {\n // NO-OP\n },\n};\n"]}
|
@@ -512,6 +512,8 @@ class DrawerLayout extends React.Component {
|
|
512
512
|
, {
|
513
513
|
userSelect: this.props.userSelect,
|
514
514
|
activeCursor: this.props.activeCursor,
|
515
|
+
mouseButton: this.props.mouseButton,
|
516
|
+
enableContextMenu: this.props.enableContextMenu,
|
515
517
|
ref: this.setPanGestureRef,
|
516
518
|
hitSlop: hitSlop,
|
517
519
|
activeOffsetX: gestureOrientation * minSwipeDistance,
|