react-native-gesture-handler 2.22.1 → 2.23.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (275) hide show
  1. package/RNGestureHandler.podspec +8 -0
  2. package/android/src/main/java/com/swmansion/gesturehandler/react/RNGestureHandlerButtonViewManager.kt +14 -0
  3. package/android/src/main/jni/cpp-adapter.cpp +19 -12
  4. package/apple/RNGestureHandler.mm +15 -8
  5. package/apple/RNGestureHandlerButton.mm +12 -2
  6. package/apple/RNGestureHandlerModule.mm +17 -5
  7. package/lib/commonjs/RNGestureHandlerModule.web.js +2 -2
  8. package/lib/commonjs/RNGestureHandlerModule.web.js.map +1 -1
  9. package/lib/commonjs/components/DrawerLayout.js +6 -0
  10. package/lib/commonjs/components/DrawerLayout.js.map +1 -1
  11. package/lib/commonjs/components/GestureButtons.js +11 -2
  12. package/lib/commonjs/components/GestureButtons.js.map +1 -1
  13. package/lib/commonjs/components/Pressable/Pressable.js +21 -5
  14. package/lib/commonjs/components/Pressable/Pressable.js.map +1 -1
  15. package/lib/commonjs/components/Pressable/index.js.map +1 -1
  16. package/lib/commonjs/components/ReanimatedSwipeable.js +49 -20
  17. package/lib/commonjs/components/ReanimatedSwipeable.js.map +1 -1
  18. package/lib/commonjs/components/Text.js +10 -4
  19. package/lib/commonjs/components/Text.js.map +1 -1
  20. package/lib/commonjs/components/touchables/TouchableHighlight.js +2 -0
  21. package/lib/commonjs/components/touchables/TouchableHighlight.js.map +1 -1
  22. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js +2 -0
  23. package/lib/commonjs/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  24. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js +5 -1
  25. package/lib/commonjs/components/touchables/TouchableNativeFeedback.js.map +1 -1
  26. package/lib/commonjs/components/touchables/TouchableOpacity.js +2 -0
  27. package/lib/commonjs/components/touchables/TouchableOpacity.js.map +1 -1
  28. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js +3 -0
  29. package/lib/commonjs/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  30. package/lib/commonjs/findNodeHandle.web.js +9 -1
  31. package/lib/commonjs/findNodeHandle.web.js.map +1 -1
  32. package/lib/commonjs/handlers/FlingGestureHandler.js +8 -0
  33. package/lib/commonjs/handlers/FlingGestureHandler.js.map +1 -1
  34. package/lib/commonjs/handlers/ForceTouchGestureHandler.js +5 -1
  35. package/lib/commonjs/handlers/ForceTouchGestureHandler.js.map +1 -1
  36. package/lib/commonjs/handlers/LongPressGestureHandler.js +8 -0
  37. package/lib/commonjs/handlers/LongPressGestureHandler.js.map +1 -1
  38. package/lib/commonjs/handlers/NativeViewGestureHandler.js +8 -0
  39. package/lib/commonjs/handlers/NativeViewGestureHandler.js.map +1 -1
  40. package/lib/commonjs/handlers/PanGestureHandler.js +8 -0
  41. package/lib/commonjs/handlers/PanGestureHandler.js.map +1 -1
  42. package/lib/commonjs/handlers/PinchGestureHandler.js +8 -0
  43. package/lib/commonjs/handlers/PinchGestureHandler.js.map +1 -1
  44. package/lib/commonjs/handlers/RotationGestureHandler.js +8 -0
  45. package/lib/commonjs/handlers/RotationGestureHandler.js.map +1 -1
  46. package/lib/commonjs/handlers/TapGestureHandler.js +8 -0
  47. package/lib/commonjs/handlers/TapGestureHandler.js.map +1 -1
  48. package/lib/commonjs/handlers/createHandler.js +6 -2
  49. package/lib/commonjs/handlers/createHandler.js.map +1 -1
  50. package/lib/commonjs/handlers/gestures/GestureDetector/index.js +1 -1
  51. package/lib/commonjs/handlers/gestures/GestureDetector/index.js.map +1 -1
  52. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js +2 -2
  53. package/lib/commonjs/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  54. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js +1 -1
  55. package/lib/commonjs/handlers/gestures/GestureDetector/utils.js.map +1 -1
  56. package/lib/commonjs/handlers/handlersRegistry.js +7 -2
  57. package/lib/commonjs/handlers/handlersRegistry.js.map +1 -1
  58. package/lib/commonjs/index.js.map +1 -1
  59. package/lib/commonjs/utils.js +3 -3
  60. package/lib/commonjs/utils.js.map +1 -1
  61. package/lib/commonjs/web/detectors/RotationGestureDetector.js +22 -22
  62. package/lib/commonjs/web/detectors/RotationGestureDetector.js.map +1 -1
  63. package/lib/commonjs/web/detectors/ScaleGestureDetector.js +24 -24
  64. package/lib/commonjs/web/detectors/ScaleGestureDetector.js.map +1 -1
  65. package/lib/commonjs/web/handlers/FlingGestureHandler.js +6 -6
  66. package/lib/commonjs/web/handlers/FlingGestureHandler.js.map +1 -1
  67. package/lib/commonjs/web/handlers/GestureHandler.js +112 -92
  68. package/lib/commonjs/web/handlers/GestureHandler.js.map +1 -1
  69. package/lib/commonjs/web/handlers/HoverGestureHandler.js +2 -2
  70. package/lib/commonjs/web/handlers/HoverGestureHandler.js.map +1 -1
  71. package/lib/commonjs/web/handlers/LongPressGestureHandler.js +6 -6
  72. package/lib/commonjs/web/handlers/LongPressGestureHandler.js.map +1 -1
  73. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js +13 -13
  74. package/lib/commonjs/web/handlers/NativeViewGestureHandler.js.map +1 -1
  75. package/lib/commonjs/web/handlers/PanGestureHandler.js +15 -15
  76. package/lib/commonjs/web/handlers/PanGestureHandler.js.map +1 -1
  77. package/lib/commonjs/web/handlers/PinchGestureHandler.js +15 -15
  78. package/lib/commonjs/web/handlers/PinchGestureHandler.js.map +1 -1
  79. package/lib/commonjs/web/handlers/RotationGestureHandler.js +12 -12
  80. package/lib/commonjs/web/handlers/RotationGestureHandler.js.map +1 -1
  81. package/lib/commonjs/web/handlers/TapGestureHandler.js +4 -4
  82. package/lib/commonjs/web/handlers/TapGestureHandler.js.map +1 -1
  83. package/lib/commonjs/web/tools/CircularBuffer.js +15 -15
  84. package/lib/commonjs/web/tools/CircularBuffer.js.map +1 -1
  85. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js +40 -40
  86. package/lib/commonjs/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  87. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js +32 -13
  88. package/lib/commonjs/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  89. package/lib/commonjs/web/tools/InteractionManager.js +16 -18
  90. package/lib/commonjs/web/tools/InteractionManager.js.map +1 -1
  91. package/lib/commonjs/web/tools/NodeManager.js +2 -2
  92. package/lib/commonjs/web/tools/NodeManager.js.map +1 -1
  93. package/lib/commonjs/web/tools/PointerTracker.js +18 -18
  94. package/lib/commonjs/web/tools/PointerTracker.js.map +1 -1
  95. package/lib/commonjs/web/tools/Vector.js.map +1 -1
  96. package/lib/commonjs/web/tools/VelocityTracker.js +1 -1
  97. package/lib/commonjs/web/tools/VelocityTracker.js.map +1 -1
  98. package/lib/module/RNGestureHandlerModule.web.js +2 -2
  99. package/lib/module/RNGestureHandlerModule.web.js.map +1 -1
  100. package/lib/module/components/DrawerLayout.js +7 -0
  101. package/lib/module/components/DrawerLayout.js.map +1 -1
  102. package/lib/module/components/GestureButtons.js +10 -2
  103. package/lib/module/components/GestureButtons.js.map +1 -1
  104. package/lib/module/components/Pressable/Pressable.js +22 -6
  105. package/lib/module/components/Pressable/Pressable.js.map +1 -1
  106. package/lib/module/components/Pressable/index.js.map +1 -1
  107. package/lib/module/components/ReanimatedSwipeable.js +49 -20
  108. package/lib/module/components/ReanimatedSwipeable.js.map +1 -1
  109. package/lib/module/components/Text.js +8 -3
  110. package/lib/module/components/Text.js.map +1 -1
  111. package/lib/module/components/touchables/TouchableHighlight.js +2 -0
  112. package/lib/module/components/touchables/TouchableHighlight.js.map +1 -1
  113. package/lib/module/components/touchables/TouchableNativeFeedback.android.js +2 -0
  114. package/lib/module/components/touchables/TouchableNativeFeedback.android.js.map +1 -1
  115. package/lib/module/components/touchables/TouchableNativeFeedback.js +6 -1
  116. package/lib/module/components/touchables/TouchableNativeFeedback.js.map +1 -1
  117. package/lib/module/components/touchables/TouchableOpacity.js +5 -0
  118. package/lib/module/components/touchables/TouchableOpacity.js.map +1 -1
  119. package/lib/module/components/touchables/TouchableWithoutFeedback.js +4 -0
  120. package/lib/module/components/touchables/TouchableWithoutFeedback.js.map +1 -1
  121. package/lib/module/findNodeHandle.web.js +8 -1
  122. package/lib/module/findNodeHandle.web.js.map +1 -1
  123. package/lib/module/handlers/FlingGestureHandler.js +7 -0
  124. package/lib/module/handlers/FlingGestureHandler.js.map +1 -1
  125. package/lib/module/handlers/ForceTouchGestureHandler.js +5 -1
  126. package/lib/module/handlers/ForceTouchGestureHandler.js.map +1 -1
  127. package/lib/module/handlers/LongPressGestureHandler.js +7 -0
  128. package/lib/module/handlers/LongPressGestureHandler.js.map +1 -1
  129. package/lib/module/handlers/NativeViewGestureHandler.js +7 -0
  130. package/lib/module/handlers/NativeViewGestureHandler.js.map +1 -1
  131. package/lib/module/handlers/PanGestureHandler.js +7 -0
  132. package/lib/module/handlers/PanGestureHandler.js.map +1 -1
  133. package/lib/module/handlers/PinchGestureHandler.js +11 -0
  134. package/lib/module/handlers/PinchGestureHandler.js.map +1 -1
  135. package/lib/module/handlers/RotationGestureHandler.js +11 -0
  136. package/lib/module/handlers/RotationGestureHandler.js.map +1 -1
  137. package/lib/module/handlers/TapGestureHandler.js +7 -0
  138. package/lib/module/handlers/TapGestureHandler.js.map +1 -1
  139. package/lib/module/handlers/createHandler.js +9 -4
  140. package/lib/module/handlers/createHandler.js.map +1 -1
  141. package/lib/module/handlers/gestures/GestureDetector/index.js +2 -2
  142. package/lib/module/handlers/gestures/GestureDetector/index.js.map +1 -1
  143. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js +2 -2
  144. package/lib/module/handlers/gestures/GestureDetector/useViewRefHandler.js.map +1 -1
  145. package/lib/module/handlers/gestures/GestureDetector/utils.js +2 -2
  146. package/lib/module/handlers/gestures/GestureDetector/utils.js.map +1 -1
  147. package/lib/module/handlers/handlersRegistry.js +6 -3
  148. package/lib/module/handlers/handlersRegistry.js.map +1 -1
  149. package/lib/module/index.js.map +1 -1
  150. package/lib/module/utils.js +2 -2
  151. package/lib/module/utils.js.map +1 -1
  152. package/lib/module/web/detectors/RotationGestureDetector.js +22 -22
  153. package/lib/module/web/detectors/RotationGestureDetector.js.map +1 -1
  154. package/lib/module/web/detectors/ScaleGestureDetector.js +24 -24
  155. package/lib/module/web/detectors/ScaleGestureDetector.js.map +1 -1
  156. package/lib/module/web/handlers/FlingGestureHandler.js +6 -6
  157. package/lib/module/web/handlers/FlingGestureHandler.js.map +1 -1
  158. package/lib/module/web/handlers/GestureHandler.js +112 -92
  159. package/lib/module/web/handlers/GestureHandler.js.map +1 -1
  160. package/lib/module/web/handlers/HoverGestureHandler.js +2 -2
  161. package/lib/module/web/handlers/HoverGestureHandler.js.map +1 -1
  162. package/lib/module/web/handlers/LongPressGestureHandler.js +6 -6
  163. package/lib/module/web/handlers/LongPressGestureHandler.js.map +1 -1
  164. package/lib/module/web/handlers/NativeViewGestureHandler.js +13 -13
  165. package/lib/module/web/handlers/NativeViewGestureHandler.js.map +1 -1
  166. package/lib/module/web/handlers/PanGestureHandler.js +15 -15
  167. package/lib/module/web/handlers/PanGestureHandler.js.map +1 -1
  168. package/lib/module/web/handlers/PinchGestureHandler.js +15 -15
  169. package/lib/module/web/handlers/PinchGestureHandler.js.map +1 -1
  170. package/lib/module/web/handlers/RotationGestureHandler.js +12 -12
  171. package/lib/module/web/handlers/RotationGestureHandler.js.map +1 -1
  172. package/lib/module/web/handlers/TapGestureHandler.js +4 -4
  173. package/lib/module/web/handlers/TapGestureHandler.js.map +1 -1
  174. package/lib/module/web/tools/CircularBuffer.js +15 -15
  175. package/lib/module/web/tools/CircularBuffer.js.map +1 -1
  176. package/lib/module/web/tools/GestureHandlerOrchestrator.js +40 -40
  177. package/lib/module/web/tools/GestureHandlerOrchestrator.js.map +1 -1
  178. package/lib/module/web/tools/GestureHandlerWebDelegate.js +32 -13
  179. package/lib/module/web/tools/GestureHandlerWebDelegate.js.map +1 -1
  180. package/lib/module/web/tools/InteractionManager.js +16 -16
  181. package/lib/module/web/tools/InteractionManager.js.map +1 -1
  182. package/lib/module/web/tools/NodeManager.js +2 -2
  183. package/lib/module/web/tools/NodeManager.js.map +1 -1
  184. package/lib/module/web/tools/PointerTracker.js +18 -18
  185. package/lib/module/web/tools/PointerTracker.js.map +1 -1
  186. package/lib/module/web/tools/Vector.js.map +1 -1
  187. package/lib/module/web/tools/VelocityTracker.js +1 -1
  188. package/lib/module/web/tools/VelocityTracker.js.map +1 -1
  189. package/lib/typescript/components/DrawerLayout.d.ts +27 -0
  190. package/lib/typescript/components/GestureButtonsProps.d.ts +18 -2
  191. package/lib/typescript/components/Pressable/PressableProps.d.ts +3 -10
  192. package/lib/typescript/components/Pressable/index.d.ts +1 -1
  193. package/lib/typescript/components/ReanimatedSwipeable.d.ts +6 -0
  194. package/lib/typescript/components/touchables/TouchableHighlight.d.ts +5 -0
  195. package/lib/typescript/components/touchables/TouchableNativeFeedback.android.d.ts +2 -0
  196. package/lib/typescript/components/touchables/TouchableNativeFeedback.d.ts +5 -1
  197. package/lib/typescript/components/touchables/TouchableNativeFeedbackProps.d.ts +3 -0
  198. package/lib/typescript/components/touchables/TouchableOpacity.d.ts +5 -0
  199. package/lib/typescript/components/touchables/TouchableWithoutFeedback.d.ts +6 -0
  200. package/lib/typescript/handlers/FlingGestureHandler.d.ts +9 -0
  201. package/lib/typescript/handlers/ForceTouchGestureHandler.d.ts +9 -0
  202. package/lib/typescript/handlers/LongPressGestureHandler.d.ts +9 -0
  203. package/lib/typescript/handlers/NativeViewGestureHandler.d.ts +9 -0
  204. package/lib/typescript/handlers/PanGestureHandler.d.ts +9 -0
  205. package/lib/typescript/handlers/PinchGestureHandler.d.ts +9 -0
  206. package/lib/typescript/handlers/RotationGestureHandler.d.ts +9 -0
  207. package/lib/typescript/handlers/TapGestureHandler.d.ts +9 -0
  208. package/lib/typescript/handlers/handlersRegistry.d.ts +1 -0
  209. package/lib/typescript/index.d.ts +1 -1
  210. package/lib/typescript/utils.d.ts +1 -1
  211. package/lib/typescript/web/detectors/RotationGestureDetector.d.ts +7 -7
  212. package/lib/typescript/web/detectors/ScaleGestureDetector.d.ts +8 -8
  213. package/lib/typescript/web/handlers/GestureHandler.d.ts +33 -28
  214. package/lib/typescript/web/handlers/IGestureHandler.d.ts +12 -13
  215. package/lib/typescript/web/tools/CircularBuffer.d.ts +3 -3
  216. package/lib/typescript/web/tools/GestureHandlerDelegate.d.ts +1 -1
  217. package/lib/typescript/web/tools/GestureHandlerOrchestrator.d.ts +2 -2
  218. package/lib/typescript/web/tools/GestureHandlerWebDelegate.d.ts +3 -2
  219. package/lib/typescript/web/tools/InteractionManager.d.ts +2 -2
  220. package/lib/typescript/web/tools/NodeManager.d.ts +1 -1
  221. package/lib/typescript/web/tools/PointerTracker.d.ts +4 -4
  222. package/lib/typescript/web/tools/VelocityTracker.d.ts +1 -1
  223. package/package.json +2 -2
  224. package/src/RNGestureHandlerModule.web.ts +2 -2
  225. package/src/components/DrawerLayout.tsx +29 -0
  226. package/src/components/GestureButtons.tsx +13 -2
  227. package/src/components/GestureButtonsProps.ts +31 -2
  228. package/src/components/Pressable/Pressable.tsx +22 -5
  229. package/src/components/Pressable/PressableProps.tsx +4 -11
  230. package/src/components/Pressable/index.ts +4 -1
  231. package/src/components/ReanimatedSwipeable.tsx +97 -66
  232. package/src/components/Text.tsx +13 -4
  233. package/src/components/touchables/TouchableHighlight.tsx +5 -0
  234. package/src/components/touchables/TouchableNativeFeedback.android.tsx +2 -0
  235. package/src/components/touchables/TouchableNativeFeedback.tsx +6 -1
  236. package/src/components/touchables/TouchableNativeFeedbackProps.tsx +3 -0
  237. package/src/components/touchables/TouchableOpacity.tsx +5 -0
  238. package/src/components/touchables/TouchableWithoutFeedback.tsx +6 -0
  239. package/src/findNodeHandle.web.ts +6 -0
  240. package/src/handlers/FlingGestureHandler.ts +10 -0
  241. package/src/handlers/ForceTouchGestureHandler.ts +9 -0
  242. package/src/handlers/LongPressGestureHandler.ts +10 -0
  243. package/src/handlers/NativeViewGestureHandler.ts +10 -0
  244. package/src/handlers/PanGestureHandler.ts +10 -0
  245. package/src/handlers/PinchGestureHandler.ts +10 -0
  246. package/src/handlers/RotationGestureHandler.ts +10 -0
  247. package/src/handlers/TapGestureHandler.ts +10 -0
  248. package/src/handlers/createHandler.tsx +11 -4
  249. package/src/handlers/gestures/GestureDetector/index.tsx +2 -2
  250. package/src/handlers/gestures/GestureDetector/useViewRefHandler.ts +3 -3
  251. package/src/handlers/gestures/GestureDetector/utils.ts +2 -2
  252. package/src/handlers/handlersRegistry.ts +7 -3
  253. package/src/index.ts +4 -1
  254. package/src/utils.ts +2 -2
  255. package/src/web/detectors/RotationGestureDetector.ts +22 -22
  256. package/src/web/detectors/ScaleGestureDetector.ts +24 -24
  257. package/src/web/handlers/FlingGestureHandler.ts +6 -7
  258. package/src/web/handlers/GestureHandler.ts +115 -105
  259. package/src/web/handlers/HoverGestureHandler.ts +2 -2
  260. package/src/web/handlers/IGestureHandler.ts +12 -13
  261. package/src/web/handlers/LongPressGestureHandler.ts +7 -7
  262. package/src/web/handlers/NativeViewGestureHandler.ts +14 -19
  263. package/src/web/handlers/PanGestureHandler.ts +17 -17
  264. package/src/web/handlers/PinchGestureHandler.ts +17 -21
  265. package/src/web/handlers/RotationGestureHandler.ts +12 -12
  266. package/src/web/handlers/TapGestureHandler.ts +4 -6
  267. package/src/web/tools/CircularBuffer.ts +15 -15
  268. package/src/web/tools/GestureHandlerDelegate.ts +1 -1
  269. package/src/web/tools/GestureHandlerOrchestrator.ts +42 -42
  270. package/src/web/tools/GestureHandlerWebDelegate.ts +32 -13
  271. package/src/web/tools/InteractionManager.ts +16 -16
  272. package/src/web/tools/NodeManager.ts +2 -2
  273. package/src/web/tools/PointerTracker.ts +20 -20
  274. package/src/web/tools/Vector.ts +1 -1
  275. package/src/web/tools/VelocityTracker.ts +1 -1
@@ -257,8 +257,8 @@ export default class PanGestureHandler extends GestureHandler {
257
257
  this.startX = this.lastX;
258
258
  this.startY = this.lastY;
259
259
 
260
- if (this.tracker.getTrackedPointersCount() > this.maxPointers) {
261
- if (this.currentState === State.ACTIVE) {
260
+ if (this.tracker.trackedPointersCount > this.maxPointers) {
261
+ if (this.state === State.ACTIVE) {
262
262
  this.cancel();
263
263
  } else {
264
264
  this.fail();
@@ -272,7 +272,7 @@ export default class PanGestureHandler extends GestureHandler {
272
272
  this.stylusData = event.stylusData;
273
273
 
274
274
  super.onPointerUp(event);
275
- if (this.currentState === State.ACTIVE) {
275
+ if (this.state === State.ACTIVE) {
276
276
  const lastCoords = this.tracker.getAbsoluteCoordsAverage();
277
277
  this.lastX = lastCoords.x;
278
278
  this.lastY = lastCoords.y;
@@ -280,11 +280,11 @@ export default class PanGestureHandler extends GestureHandler {
280
280
 
281
281
  this.tracker.removeFromTracker(event.pointerId);
282
282
 
283
- if (this.tracker.getTrackedPointersCount() === 0) {
283
+ if (this.tracker.trackedPointersCount === 0) {
284
284
  this.clearActivationTimeout();
285
285
  }
286
286
 
287
- if (this.currentState === State.ACTIVE) {
287
+ if (this.state === State.ACTIVE) {
288
288
  this.end();
289
289
  } else {
290
290
  this.resetProgress();
@@ -308,8 +308,8 @@ export default class PanGestureHandler extends GestureHandler {
308
308
 
309
309
  if (
310
310
  !(
311
- this.currentState === State.ACTIVE &&
312
- this.tracker.getTrackedPointersCount() < this.minPointers
311
+ this.state === State.ACTIVE &&
312
+ this.tracker.trackedPointersCount < this.minPointers
313
313
  )
314
314
  ) {
315
315
  this.checkBegan();
@@ -334,7 +334,7 @@ export default class PanGestureHandler extends GestureHandler {
334
334
  }
335
335
 
336
336
  protected onPointerOutOfBounds(event: AdaptedEvent): void {
337
- if (this.getShouldCancelWhenOutside()) {
337
+ if (this.shouldCancelWhenOutside) {
338
338
  return;
339
339
  }
340
340
 
@@ -351,7 +351,7 @@ export default class PanGestureHandler extends GestureHandler {
351
351
 
352
352
  this.checkBegan();
353
353
 
354
- if (this.currentState === State.ACTIVE) {
354
+ if (this.state === State.ACTIVE) {
355
355
  super.onPointerOutOfBounds(event);
356
356
  }
357
357
  }
@@ -360,10 +360,10 @@ export default class PanGestureHandler extends GestureHandler {
360
360
  clearTimeout(this.endWheelTimeout);
361
361
 
362
362
  this.endWheelTimeout = setTimeout(() => {
363
- if (this.currentState === State.ACTIVE) {
363
+ if (this.state === State.ACTIVE) {
364
364
  this.end();
365
365
  this.tracker.removeFromTracker(event.pointerId);
366
- this.currentState = State.UNDETERMINED;
366
+ this.state = State.UNDETERMINED;
367
367
  }
368
368
 
369
369
  this.wheelDevice = WheelDevice.UNDETERMINED;
@@ -378,7 +378,7 @@ export default class PanGestureHandler extends GestureHandler {
378
378
  return;
379
379
  }
380
380
 
381
- if (this.currentState === State.UNDETERMINED) {
381
+ if (this.state === State.UNDETERMINED) {
382
382
  this.wheelDevice =
383
383
  event.wheelDeltaY! % 120 !== 0
384
384
  ? WheelDevice.TOUCHPAD
@@ -523,8 +523,8 @@ export default class PanGestureHandler extends GestureHandler {
523
523
 
524
524
  private tryBegin(event: AdaptedEvent): void {
525
525
  if (
526
- this.currentState === State.UNDETERMINED &&
527
- this.tracker.getTrackedPointersCount() >= this.minPointers
526
+ this.state === State.UNDETERMINED &&
527
+ this.tracker.trackedPointersCount >= this.minPointers
528
528
  ) {
529
529
  this.resetProgress();
530
530
  this.offsetX = 0;
@@ -547,7 +547,7 @@ export default class PanGestureHandler extends GestureHandler {
547
547
  }
548
548
 
549
549
  private checkBegan(): void {
550
- if (this.currentState === State.BEGAN) {
550
+ if (this.state === State.BEGAN) {
551
551
  if (this.shouldFail()) {
552
552
  this.fail();
553
553
  } else if (this.shouldActivate()) {
@@ -557,7 +557,7 @@ export default class PanGestureHandler extends GestureHandler {
557
557
  }
558
558
 
559
559
  public activate(force = false): void {
560
- if (this.currentState !== State.ACTIVE) {
560
+ if (this.state !== State.ACTIVE) {
561
561
  this.resetProgress();
562
562
  }
563
563
 
@@ -573,7 +573,7 @@ export default class PanGestureHandler extends GestureHandler {
573
573
  }
574
574
 
575
575
  protected resetProgress(): void {
576
- if (this.currentState === State.ACTIVE) {
576
+ if (this.state === State.ACTIVE) {
577
577
  return;
578
578
  }
579
579
 
@@ -16,24 +16,23 @@ export default class PinchGestureHandler extends GestureHandler {
16
16
 
17
17
  private scaleDetectorListener: ScaleGestureListener = {
18
18
  onScaleBegin: (detector: ScaleGestureDetector): boolean => {
19
- this.startingSpan = detector.getCurrentSpan();
19
+ this.startingSpan = detector.currentSpan;
20
20
  return true;
21
21
  },
22
22
  onScale: (detector: ScaleGestureDetector): boolean => {
23
23
  const prevScaleFactor: number = this.scale;
24
- this.scale *= detector.getScaleFactor(
25
- this.tracker.getTrackedPointersCount()
24
+ this.scale *= detector.calculateScaleFactor(
25
+ this.tracker.trackedPointersCount
26
26
  );
27
27
 
28
- const delta = detector.getTimeDelta();
28
+ const delta = detector.timeDelta;
29
29
  if (delta > 0) {
30
30
  this.velocity = (this.scale - prevScaleFactor) / delta;
31
31
  }
32
32
 
33
33
  if (
34
- Math.abs(this.startingSpan - detector.getCurrentSpan()) >=
35
- this.spanSlop &&
36
- this.currentState === State.BEGAN
34
+ Math.abs(this.startingSpan - detector.currentSpan) >= this.spanSlop &&
35
+ this.state === State.BEGAN
37
36
  ) {
38
37
  this.activate();
39
38
  }
@@ -52,13 +51,13 @@ export default class PinchGestureHandler extends GestureHandler {
52
51
  public init(ref: number, propsRef: React.RefObject<unknown>) {
53
52
  super.init(ref, propsRef);
54
53
 
55
- this.setShouldCancelWhenOutside(false);
54
+ this.shouldCancelWhenOutside = false;
56
55
  }
57
56
 
58
57
  protected transformNativeEvent() {
59
58
  return {
60
- focalX: this.scaleGestureDetector.getFocusX(),
61
- focalY: this.scaleGestureDetector.getFocusY(),
59
+ focalX: this.scaleGestureDetector.focusX,
60
+ focalY: this.scaleGestureDetector.focusY,
62
61
  velocity: this.velocity,
63
62
  scale: this.scale,
64
63
  };
@@ -81,12 +80,12 @@ export default class PinchGestureHandler extends GestureHandler {
81
80
  protected onPointerUp(event: AdaptedEvent): void {
82
81
  super.onPointerUp(event);
83
82
  this.tracker.removeFromTracker(event.pointerId);
84
- if (this.currentState !== State.ACTIVE) {
83
+ if (this.state !== State.ACTIVE) {
85
84
  return;
86
85
  }
87
86
  this.scaleGestureDetector.onTouchEvent(event, this.tracker);
88
87
 
89
- if (this.currentState === State.ACTIVE) {
88
+ if (this.state === State.ACTIVE) {
90
89
  this.end();
91
90
  } else {
92
91
  this.fail();
@@ -98,16 +97,13 @@ export default class PinchGestureHandler extends GestureHandler {
98
97
  this.scaleGestureDetector.onTouchEvent(event, this.tracker);
99
98
  this.tracker.removeFromTracker(event.pointerId);
100
99
 
101
- if (
102
- this.currentState === State.ACTIVE &&
103
- this.tracker.getTrackedPointersCount() < 2
104
- ) {
100
+ if (this.state === State.ACTIVE && this.tracker.trackedPointersCount < 2) {
105
101
  this.end();
106
102
  }
107
103
  }
108
104
 
109
105
  protected onPointerMove(event: AdaptedEvent): void {
110
- if (this.tracker.getTrackedPointersCount() < 2) {
106
+ if (this.tracker.trackedPointersCount < 2) {
111
107
  return;
112
108
  }
113
109
  this.tracker.track(event);
@@ -116,7 +112,7 @@ export default class PinchGestureHandler extends GestureHandler {
116
112
  super.onPointerMove(event);
117
113
  }
118
114
  protected onPointerOutOfBounds(event: AdaptedEvent): void {
119
- if (this.tracker.getTrackedPointersCount() < 2) {
115
+ if (this.tracker.trackedPointersCount < 2) {
120
116
  return;
121
117
  }
122
118
  this.tracker.track(event);
@@ -126,7 +122,7 @@ export default class PinchGestureHandler extends GestureHandler {
126
122
  }
127
123
 
128
124
  private tryBegin(): void {
129
- if (this.currentState !== State.UNDETERMINED) {
125
+ if (this.state !== State.UNDETERMINED) {
130
126
  return;
131
127
  }
132
128
 
@@ -135,7 +131,7 @@ export default class PinchGestureHandler extends GestureHandler {
135
131
  }
136
132
 
137
133
  public activate(force?: boolean): void {
138
- if (this.currentState !== State.ACTIVE) {
134
+ if (this.state !== State.ACTIVE) {
139
135
  this.resetProgress();
140
136
  }
141
137
 
@@ -147,7 +143,7 @@ export default class PinchGestureHandler extends GestureHandler {
147
143
  }
148
144
 
149
145
  protected resetProgress(): void {
150
- if (this.currentState === State.ACTIVE) {
146
+ if (this.state === State.ACTIVE) {
151
147
  return;
152
148
  }
153
149
  this.velocity = 0;
@@ -19,9 +19,9 @@ export default class RotationGestureHandler extends GestureHandler {
19
19
  onRotationBegin: (_detector: RotationGestureDetector): boolean => true,
20
20
  onRotation: (detector: RotationGestureDetector): boolean => {
21
21
  const previousRotation: number = this.rotation;
22
- this.rotation += detector.getRotation();
22
+ this.rotation += detector.rotation;
23
23
 
24
- const delta = detector.getTimeDelta();
24
+ const delta = detector.timeDelta;
25
25
 
26
26
  if (delta > 0) {
27
27
  this.velocity = (this.rotation - previousRotation) / delta;
@@ -29,7 +29,7 @@ export default class RotationGestureHandler extends GestureHandler {
29
29
 
30
30
  if (
31
31
  Math.abs(this.rotation) >= ROTATION_RECOGNITION_THRESHOLD &&
32
- this.currentState === State.BEGAN
32
+ this.state === State.BEGAN
33
33
  ) {
34
34
  this.activate();
35
35
  }
@@ -47,7 +47,7 @@ export default class RotationGestureHandler extends GestureHandler {
47
47
  public init(ref: number, propsRef: React.RefObject<unknown>): void {
48
48
  super.init(ref, propsRef);
49
49
 
50
- this.setShouldCancelWhenOutside(false);
50
+ this.shouldCancelWhenOutside = false;
51
51
  }
52
52
 
53
53
  protected transformNativeEvent() {
@@ -60,13 +60,13 @@ export default class RotationGestureHandler extends GestureHandler {
60
60
  }
61
61
 
62
62
  public getAnchorX(): number {
63
- const anchorX = this.rotationGestureDetector.getAnchorX();
63
+ const anchorX = this.rotationGestureDetector.anchorX;
64
64
 
65
65
  return anchorX ? anchorX : this.cachedAnchorX;
66
66
  }
67
67
 
68
68
  public getAnchorY(): number {
69
- const anchorY = this.rotationGestureDetector.getAnchorY();
69
+ const anchorY = this.rotationGestureDetector.anchorY;
70
70
 
71
71
  return anchorY ? anchorY : this.cachedAnchorY;
72
72
  }
@@ -87,7 +87,7 @@ export default class RotationGestureHandler extends GestureHandler {
87
87
  }
88
88
 
89
89
  protected onPointerMove(event: AdaptedEvent): void {
90
- if (this.tracker.getTrackedPointersCount() < 2) {
90
+ if (this.tracker.trackedPointersCount < 2) {
91
91
  return;
92
92
  }
93
93
 
@@ -106,7 +106,7 @@ export default class RotationGestureHandler extends GestureHandler {
106
106
  }
107
107
 
108
108
  protected onPointerOutOfBounds(event: AdaptedEvent): void {
109
- if (this.tracker.getTrackedPointersCount() < 2) {
109
+ if (this.tracker.trackedPointersCount < 2) {
110
110
  return;
111
111
  }
112
112
 
@@ -129,11 +129,11 @@ export default class RotationGestureHandler extends GestureHandler {
129
129
  this.tracker.removeFromTracker(event.pointerId);
130
130
  this.rotationGestureDetector.onTouchEvent(event, this.tracker);
131
131
 
132
- if (this.currentState !== State.ACTIVE) {
132
+ if (this.state !== State.ACTIVE) {
133
133
  return;
134
134
  }
135
135
 
136
- if (this.currentState === State.ACTIVE) {
136
+ if (this.state === State.ACTIVE) {
137
137
  this.end();
138
138
  } else {
139
139
  this.fail();
@@ -147,7 +147,7 @@ export default class RotationGestureHandler extends GestureHandler {
147
147
  }
148
148
 
149
149
  protected tryBegin(): void {
150
- if (this.currentState !== State.UNDETERMINED) {
150
+ if (this.state !== State.UNDETERMINED) {
151
151
  return;
152
152
  }
153
153
 
@@ -155,7 +155,7 @@ export default class RotationGestureHandler extends GestureHandler {
155
155
  }
156
156
 
157
157
  protected onReset(): void {
158
- if (this.currentState === State.ACTIVE) {
158
+ if (this.state === State.ACTIVE) {
159
159
  return;
160
160
  }
161
161
 
@@ -195,10 +195,8 @@ export default class TapGestureHandler extends GestureHandler {
195
195
  }
196
196
 
197
197
  private updateState(event: AdaptedEvent): void {
198
- if (
199
- this.currentMaxNumberOfPointers < this.tracker.getTrackedPointersCount()
200
- ) {
201
- this.currentMaxNumberOfPointers = this.tracker.getTrackedPointersCount();
198
+ if (this.currentMaxNumberOfPointers < this.tracker.trackedPointersCount) {
199
+ this.currentMaxNumberOfPointers = this.tracker.trackedPointersCount;
202
200
  }
203
201
 
204
202
  if (this.shouldFail()) {
@@ -206,7 +204,7 @@ export default class TapGestureHandler extends GestureHandler {
206
204
  return;
207
205
  }
208
206
 
209
- switch (this.currentState) {
207
+ switch (this.state) {
210
208
  case State.UNDETERMINED:
211
209
  if (event.eventType === EventTypes.DOWN) {
212
210
  this.begin();
@@ -227,7 +225,7 @@ export default class TapGestureHandler extends GestureHandler {
227
225
  }
228
226
 
229
227
  private trySettingPosition(event: AdaptedEvent): void {
230
- if (this.currentState !== State.UNDETERMINED) {
228
+ if (this.state !== State.UNDETERMINED) {
231
229
  return;
232
230
  }
233
231
 
@@ -1,31 +1,27 @@
1
1
  export default class CircularBuffer<T> {
2
- private bufferSize: number;
2
+ private capacity: number;
3
3
  private buffer: T[];
4
4
  private index: number;
5
- private actualSize: number;
5
+ private _size: number;
6
6
 
7
7
  constructor(size: number) {
8
- this.bufferSize = size;
8
+ this.capacity = size;
9
9
  this.buffer = new Array<T>(size);
10
10
  this.index = 0;
11
- this.actualSize = 0;
12
- }
13
-
14
- public get size(): number {
15
- return this.actualSize;
11
+ this._size = 0;
16
12
  }
17
13
 
18
14
  public push(element: T): void {
19
15
  this.buffer[this.index] = element;
20
- this.index = (this.index + 1) % this.bufferSize;
21
- this.actualSize = Math.min(this.actualSize + 1, this.bufferSize);
16
+ this.index = (this.index + 1) % this.capacity;
17
+ this._size = Math.min(this.size + 1, this.capacity);
22
18
  }
23
19
 
24
20
  public get(at: number): T {
25
- if (this.actualSize === this.bufferSize) {
26
- let index = (this.index + at) % this.bufferSize;
21
+ if (this._size === this.capacity) {
22
+ let index = (this.index + at) % this.capacity;
27
23
  if (index < 0) {
28
- index += this.bufferSize;
24
+ index += this.capacity;
29
25
  }
30
26
 
31
27
  return this.buffer[index];
@@ -35,8 +31,12 @@ export default class CircularBuffer<T> {
35
31
  }
36
32
 
37
33
  public clear(): void {
38
- this.buffer = new Array<T>(this.bufferSize);
34
+ this.buffer = new Array<T>(this.capacity);
39
35
  this.index = 0;
40
- this.actualSize = 0;
36
+ this._size = 0;
37
+ }
38
+
39
+ public get size() {
40
+ return this._size;
41
41
  }
42
42
  }
@@ -8,7 +8,7 @@ export interface MeasureResult {
8
8
  }
9
9
 
10
10
  export interface GestureHandlerDelegate<TComponent, THandler> {
11
- getView(): TComponent;
11
+ view: TComponent;
12
12
 
13
13
  init(viewRef: number, handler: THandler): void;
14
14
  isPointerInBounds({ x, y }: { x: number; y: number }): boolean;
@@ -5,7 +5,7 @@ import type IGestureHandler from '../handlers/IGestureHandler';
5
5
  import PointerTracker from './PointerTracker';
6
6
 
7
7
  export default class GestureHandlerOrchestrator {
8
- private static instance: GestureHandlerOrchestrator;
8
+ private static _instance: GestureHandlerOrchestrator;
9
9
 
10
10
  private gestureHandlers: IGestureHandler[] = [];
11
11
  private awaitingHandlers: IGestureHandler[] = [];
@@ -26,9 +26,9 @@ export default class GestureHandlerOrchestrator {
26
26
 
27
27
  private cleanHandler(handler: IGestureHandler): void {
28
28
  handler.reset();
29
- handler.setActive(false);
30
- handler.setAwaiting(false);
31
- handler.setActivationIndex(Number.MAX_VALUE);
29
+ handler.active = false;
30
+ handler.awaiting = false;
31
+ handler.activationIndex = Number.MAX_VALUE;
32
32
  }
33
33
 
34
34
  public removeHandlerFromOrchestrator(handler: IGestureHandler): void {
@@ -41,7 +41,7 @@ export default class GestureHandlerOrchestrator {
41
41
 
42
42
  if (indexInAwaitingHandlers >= 0) {
43
43
  this.awaitingHandlers.splice(indexInAwaitingHandlers, 1);
44
- this.awaitingHandlersTags.delete(handler.getTag());
44
+ this.awaitingHandlersTags.delete(handler.handlerTag);
45
45
  }
46
46
  }
47
47
 
@@ -51,7 +51,7 @@ export default class GestureHandlerOrchestrator {
51
51
  for (let i = this.gestureHandlers.length - 1; i >= 0; --i) {
52
52
  const handler = this.gestureHandlers[i];
53
53
 
54
- if (this.isFinished(handler.getState()) && !handler.isAwaiting()) {
54
+ if (this.isFinished(handler.state) && !handler.awaiting) {
55
55
  this.cleanHandler(handler);
56
56
  handlersToRemove.add(handler);
57
57
  }
@@ -65,7 +65,7 @@ export default class GestureHandlerOrchestrator {
65
65
  private hasOtherHandlerToWaitFor(handler: IGestureHandler): boolean {
66
66
  const hasToWaitFor = (otherHandler: IGestureHandler) => {
67
67
  return (
68
- !this.isFinished(otherHandler.getState()) &&
68
+ !this.isFinished(otherHandler.state) &&
69
69
  this.shouldHandlerWaitForOther(handler, otherHandler)
70
70
  );
71
71
  };
@@ -79,7 +79,7 @@ export default class GestureHandlerOrchestrator {
79
79
  const shouldBeCancelled = (otherHandler: IGestureHandler) => {
80
80
  return (
81
81
  this.shouldHandlerWaitForOther(handler, otherHandler) &&
82
- otherHandler.getState() === State.END
82
+ otherHandler.state === State.END
83
83
  );
84
84
  };
85
85
 
@@ -97,7 +97,7 @@ export default class GestureHandlerOrchestrator {
97
97
  return;
98
98
  }
99
99
 
100
- const handlerState = handler.getState();
100
+ const handlerState = handler.state;
101
101
 
102
102
  if (handlerState === State.CANCELLED || handlerState === State.FAILED) {
103
103
  return;
@@ -129,7 +129,7 @@ export default class GestureHandlerOrchestrator {
129
129
  private cleanupAwaitingHandlers(handler: IGestureHandler): void {
130
130
  const shouldWait = (otherHandler: IGestureHandler) => {
131
131
  return (
132
- !otherHandler.isAwaiting() &&
132
+ !otherHandler.awaiting &&
133
133
  this.shouldHandlerWaitForOther(otherHandler, handler)
134
134
  );
135
135
  };
@@ -137,12 +137,12 @@ export default class GestureHandlerOrchestrator {
137
137
  for (const otherHandler of this.awaitingHandlers) {
138
138
  if (shouldWait(otherHandler)) {
139
139
  this.cleanHandler(otherHandler);
140
- this.awaitingHandlersTags.delete(otherHandler.getTag());
140
+ this.awaitingHandlersTags.delete(otherHandler.handlerTag);
141
141
  }
142
142
  }
143
143
 
144
144
  this.awaitingHandlers = this.awaitingHandlers.filter((otherHandler) =>
145
- this.awaitingHandlersTags.has(otherHandler.getTag())
145
+ this.awaitingHandlersTags.has(otherHandler.handlerTag)
146
146
  );
147
147
  }
148
148
 
@@ -152,7 +152,7 @@ export default class GestureHandlerOrchestrator {
152
152
  oldState: State,
153
153
  sendIfDisabled?: boolean
154
154
  ): void {
155
- if (!handler.isEnabled() && !sendIfDisabled) {
155
+ if (!handler.enabled && !sendIfDisabled) {
156
156
  return;
157
157
  }
158
158
 
@@ -162,7 +162,7 @@ export default class GestureHandlerOrchestrator {
162
162
  for (const otherHandler of this.awaitingHandlers) {
163
163
  if (
164
164
  !this.shouldHandlerWaitForOther(otherHandler, handler) ||
165
- !this.awaitingHandlersTags.has(otherHandler.getTag())
165
+ !this.awaitingHandlersTags.has(otherHandler.handlerTag)
166
166
  ) {
167
167
  continue;
168
168
  }
@@ -174,7 +174,7 @@ export default class GestureHandlerOrchestrator {
174
174
 
175
175
  otherHandler.cancel();
176
176
 
177
- if (otherHandler.getState() === State.END) {
177
+ if (otherHandler.state === State.END) {
178
178
  // Handle edge case, where discrete gestures end immediately after activation thus
179
179
  // their state is set to END and when the gesture they are waiting for activates they
180
180
  // should be cancelled, however `cancel` was never sent as gestures were already in the END state.
@@ -182,14 +182,14 @@ export default class GestureHandlerOrchestrator {
182
182
  otherHandler.sendEvent(State.CANCELLED, State.BEGAN);
183
183
  }
184
184
 
185
- otherHandler.setAwaiting(false);
185
+ otherHandler.awaiting = false;
186
186
  }
187
187
  }
188
188
 
189
189
  if (newState === State.ACTIVE) {
190
190
  this.tryActivate(handler);
191
191
  } else if (oldState === State.ACTIVE || oldState === State.END) {
192
- if (handler.isActive()) {
192
+ if (handler.active) {
193
193
  handler.sendEvent(newState, oldState);
194
194
  } else if (
195
195
  oldState === State.ACTIVE &&
@@ -214,11 +214,11 @@ export default class GestureHandlerOrchestrator {
214
214
  }
215
215
 
216
216
  private makeActive(handler: IGestureHandler): void {
217
- const currentState = handler.getState();
217
+ const currentState = handler.state;
218
218
 
219
- handler.setActive(true);
220
- handler.setShouldResetProgress(true);
221
- handler.setActivationIndex(this.activationIndex++);
219
+ handler.active = true;
220
+ handler.shouldResetProgress = true;
221
+ handler.activationIndex = this.activationIndex++;
222
222
 
223
223
  for (let i = this.gestureHandlers.length - 1; i >= 0; --i) {
224
224
  if (this.shouldHandlerBeCancelledBy(this.gestureHandlers[i], handler)) {
@@ -228,7 +228,7 @@ export default class GestureHandlerOrchestrator {
228
228
 
229
229
  for (const otherHandler of this.awaitingHandlers) {
230
230
  if (this.shouldHandlerBeCancelledBy(otherHandler, handler)) {
231
- otherHandler.setAwaiting(false);
231
+ otherHandler.awaiting = false;
232
232
  }
233
233
  }
234
234
 
@@ -241,11 +241,11 @@ export default class GestureHandlerOrchestrator {
241
241
  }
242
242
  }
243
243
 
244
- if (!handler.isAwaiting()) {
244
+ if (!handler.awaiting) {
245
245
  return;
246
246
  }
247
247
 
248
- handler.setAwaiting(false);
248
+ handler.awaiting = false;
249
249
 
250
250
  this.awaitingHandlers = this.awaitingHandlers.filter(
251
251
  (otherHandler) => otherHandler !== handler
@@ -258,10 +258,10 @@ export default class GestureHandlerOrchestrator {
258
258
  }
259
259
 
260
260
  this.awaitingHandlers.push(handler);
261
- this.awaitingHandlersTags.add(handler.getTag());
261
+ this.awaitingHandlersTags.add(handler.handlerTag);
262
262
 
263
- handler.setAwaiting(true);
264
- handler.setActivationIndex(this.activationIndex++);
263
+ handler.awaiting = true;
264
+ handler.activationIndex = this.activationIndex++;
265
265
  }
266
266
 
267
267
  public recordHandlerIfNotPresent(handler: IGestureHandler): void {
@@ -271,9 +271,9 @@ export default class GestureHandlerOrchestrator {
271
271
 
272
272
  this.gestureHandlers.push(handler);
273
273
 
274
- handler.setActive(false);
275
- handler.setAwaiting(false);
276
- handler.setActivationIndex(Number.MAX_SAFE_INTEGER);
274
+ handler.active = false;
275
+ handler.awaiting = false;
276
+ handler.activationIndex = Number.MAX_SAFE_INTEGER;
277
277
  }
278
278
 
279
279
  private shouldHandlerWaitForOther(
@@ -306,7 +306,7 @@ export default class GestureHandlerOrchestrator {
306
306
  return false;
307
307
  }
308
308
 
309
- if (handler.isAwaiting() || handler.getState() === State.ACTIVE) {
309
+ if (handler.awaiting || handler.state === State.ACTIVE) {
310
310
  // For now it always returns false
311
311
  return handler.shouldBeCancelledByOther(otherHandler);
312
312
  }
@@ -316,7 +316,7 @@ export default class GestureHandlerOrchestrator {
316
316
 
317
317
  if (
318
318
  !PointerTracker.shareCommonPointers(handlerPointers, otherPointers) &&
319
- handler.getDelegate().getView() !== otherHandler.getDelegate().getView()
319
+ handler.delegate.view !== otherHandler.delegate.view
320
320
  ) {
321
321
  return this.checkOverlap(handler, otherHandler);
322
322
  }
@@ -335,11 +335,11 @@ export default class GestureHandlerOrchestrator {
335
335
  // TODO: Find better way to handle that issue, for example by activation order and handler cancelling
336
336
 
337
337
  const isPointerWithinBothBounds = (pointer: number) => {
338
- const point = handler.getTracker().getLastAbsoluteCoords(pointer);
338
+ const point = handler.tracker.getLastAbsoluteCoords(pointer);
339
339
 
340
340
  return (
341
- handler.getDelegate().isPointerInBounds(point) &&
342
- otherHandler.getDelegate().isPointerInBounds(point)
341
+ handler.delegate.isPointerInBounds(point) &&
342
+ otherHandler.delegate.isPointerInBounds(point)
343
343
  );
344
344
  };
345
345
 
@@ -361,8 +361,8 @@ export default class GestureHandlerOrchestrator {
361
361
  public cancelMouseAndPenGestures(currentHandler: IGestureHandler): void {
362
362
  this.gestureHandlers.forEach((handler: IGestureHandler) => {
363
363
  if (
364
- handler.getPointerType() !== PointerType.MOUSE &&
365
- handler.getPointerType() !== PointerType.STYLUS
364
+ handler.pointerType !== PointerType.MOUSE &&
365
+ handler.pointerType !== PointerType.STYLUS
366
366
  ) {
367
367
  return;
368
368
  }
@@ -377,16 +377,16 @@ export default class GestureHandlerOrchestrator {
377
377
  //
378
378
  // However, handler will receive manually created onPointerEnter that is triggered in EventManager in onPointerMove method.
379
379
  // There may be possibility to use that fact to make handler respond properly to first mouse click
380
- handler.getTracker().resetTracker();
380
+ handler.tracker.resetTracker();
381
381
  }
382
382
  });
383
383
  }
384
384
 
385
- public static getInstance(): GestureHandlerOrchestrator {
386
- if (!GestureHandlerOrchestrator.instance) {
387
- GestureHandlerOrchestrator.instance = new GestureHandlerOrchestrator();
385
+ public static get instance(): GestureHandlerOrchestrator {
386
+ if (!GestureHandlerOrchestrator._instance) {
387
+ GestureHandlerOrchestrator._instance = new GestureHandlerOrchestrator();
388
388
  }
389
389
 
390
- return GestureHandlerOrchestrator.instance;
390
+ return GestureHandlerOrchestrator._instance;
391
391
  }
392
392
  }