@nativescript-community/ui-drawer 0.0.29 → 0.0.33

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 (193) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/README.md +149 -90
  3. package/angular/bundles/nativescript-community-ui-drawer-angular.umd.js +54 -31
  4. package/angular/esm2015/index.js +1 -1
  5. package/angular/esm2015/module.js +11 -10
  6. package/angular/esm2015/nativescript-community-ui-drawer-angular.js +1 -1
  7. package/angular/fesm2015/nativescript-community-ui-drawer-angular.js +34 -32
  8. package/angular/module.d.ts +15 -14
  9. package/angular/package.json +3 -3
  10. package/index.js +15 -10
  11. package/package.json +11 -3
  12. package/vue/index.js +1 -1
  13. package/angular/bundles/nativescript-community-ui-drawer-angular.umd.min.js +0 -2
  14. package/pnpm-global/5/node_modules/.modules.yaml +0 -24
  15. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/CHANGELOG.md +0 -467
  16. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/LICENSE +0 -201
  17. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/README.md +0 -56
  18. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.d.ts +0 -155
  19. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.js +0 -535
  20. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.d.ts +0 -93
  21. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.js +0 -222
  22. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.d.ts +0 -149
  23. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.d.ts +0 -53
  24. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.js +0 -253
  25. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gestures_override.d.ts +0 -27
  26. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gestures_override.js +0 -263
  27. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/package.json +0 -39
  28. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/AndroidManifest.xml +0 -2
  29. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/include.gradle +0 -9
  30. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/GestureHandlerInteractionController.java +0 -79
  31. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/PageLayout.java +0 -169
  32. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/RootViewGestureHandler.java +0 -45
  33. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/BaseGestureHandlerInteractionController.java +0 -19
  34. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/FlingGestureHandler.java +0 -125
  35. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandler.java +0 -541
  36. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerInteractionController.java +0 -11
  37. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.java +0 -569
  38. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerRegistry.java +0 -10
  39. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerRegistryImpl.java +0 -97
  40. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureUtils.java +0 -51
  41. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/LongPressGestureHandler.java +0 -77
  42. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/NativeViewGestureHandler.java +0 -141
  43. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/OnTouchEventListener.java +0 -11
  44. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PanGestureHandler.java +0 -320
  45. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PinchGestureHandler.java +0 -138
  46. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEvents.java +0 -25
  47. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEventsConfig.java +0 -25
  48. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEventsSpec.java +0 -25
  49. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/RotationGestureDetector.java +0 -171
  50. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/RotationGestureHandler.java +0 -96
  51. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/ScaleGestureDetector.java +0 -597
  52. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/TapGestureHandler.java +0 -176
  53. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/ViewConfigurationHelper.java +0 -12
  54. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/res/values/config.xml +0 -13
  55. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/FlingHandler.h +0 -6
  56. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/FlingHandler.m +0 -131
  57. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/ForceTouchHandler.h +0 -4
  58. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/ForceTouchHandler.m +0 -170
  59. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandler.h +0 -98
  60. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandler.m +0 -365
  61. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerDirection.h +0 -8
  62. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerEvents.h +0 -30
  63. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerEvents.m +0 -122
  64. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerHeader.h +0 -23
  65. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerManager.h +0 -25
  66. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerManager.m +0 -169
  67. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerRegistry.h +0 -18
  68. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerRegistry.m +0 -49
  69. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerState.h +0 -10
  70. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/LongPressHandler.h +0 -12
  71. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/LongPressHandler.m +0 -100
  72. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/NativeViewHandler.h +0 -15
  73. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/NativeViewHandler.m +0 -163
  74. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PanHandler.h +0 -14
  75. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PanHandler.m +0 -242
  76. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PinchHandler.h +0 -12
  77. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PinchHandler.m +0 -36
  78. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RootViewGestureRecognizer.h +0 -17
  79. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RootViewGestureRecognizer.m +0 -93
  80. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RotationHandler.h +0 -12
  81. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RotationHandler.m +0 -36
  82. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/TapHandler.h +0 -13
  83. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/TapHandler.m +0 -228
  84. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/module.modulemap +0 -5
  85. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/pnpm-lock.yaml +0 -10
  86. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/references.d.ts +0 -3
  87. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/typings/android.d.ts +0 -456
  88. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/typings/extensions.android.d.ts +0 -16
  89. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/typings/ios.d.ts +0 -266
  90. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/CHANGELOG.md +0 -94
  91. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/LICENSE +0 -201
  92. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/README.md +0 -17
  93. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observable.d.ts +0 -17
  94. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observable.js +0 -37
  95. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observablearray.d.ts +0 -10
  96. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observablearray.js +0 -224
  97. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/package.json +0 -31
  98. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/CHANGELOG.md +0 -94
  99. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/LICENSE +0 -201
  100. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/README.md +0 -17
  101. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observable.d.ts +0 -17
  102. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observable.js +0 -37
  103. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observablearray.d.ts +0 -10
  104. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observablearray.js +0 -224
  105. package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/package.json +0 -31
  106. package/pnpm-global/5/node_modules/.pnpm/lock.yaml +0 -19
  107. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/CHANGELOG.md +0 -94
  108. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/LICENSE +0 -201
  109. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/README.md +0 -17
  110. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observable.d.ts +0 -17
  111. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observable.js +0 -37
  112. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observablearray.d.ts +0 -10
  113. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observablearray.js +0 -224
  114. package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/package.json +0 -31
  115. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/CHANGELOG.md +0 -467
  116. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/LICENSE +0 -201
  117. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/README.md +0 -56
  118. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.d.ts +0 -155
  119. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.js +0 -535
  120. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.d.ts +0 -93
  121. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.js +0 -222
  122. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.d.ts +0 -149
  123. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.d.ts +0 -53
  124. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.js +0 -253
  125. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gestures_override.d.ts +0 -27
  126. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gestures_override.js +0 -263
  127. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/package.json +0 -39
  128. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/AndroidManifest.xml +0 -2
  129. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/include.gradle +0 -9
  130. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/GestureHandlerInteractionController.java +0 -79
  131. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/PageLayout.java +0 -169
  132. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/RootViewGestureHandler.java +0 -45
  133. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/BaseGestureHandlerInteractionController.java +0 -19
  134. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/FlingGestureHandler.java +0 -125
  135. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandler.java +0 -541
  136. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerInteractionController.java +0 -11
  137. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.java +0 -569
  138. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerRegistry.java +0 -10
  139. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerRegistryImpl.java +0 -97
  140. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureUtils.java +0 -51
  141. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/LongPressGestureHandler.java +0 -77
  142. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/NativeViewGestureHandler.java +0 -141
  143. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/OnTouchEventListener.java +0 -11
  144. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PanGestureHandler.java +0 -320
  145. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PinchGestureHandler.java +0 -138
  146. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEvents.java +0 -25
  147. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEventsConfig.java +0 -25
  148. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEventsSpec.java +0 -25
  149. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/RotationGestureDetector.java +0 -171
  150. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/RotationGestureHandler.java +0 -96
  151. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/ScaleGestureDetector.java +0 -597
  152. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/TapGestureHandler.java +0 -176
  153. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/ViewConfigurationHelper.java +0 -12
  154. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/res/values/config.xml +0 -13
  155. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/FlingHandler.h +0 -6
  156. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/FlingHandler.m +0 -131
  157. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/ForceTouchHandler.h +0 -4
  158. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/ForceTouchHandler.m +0 -170
  159. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandler.h +0 -98
  160. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandler.m +0 -365
  161. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerDirection.h +0 -8
  162. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerEvents.h +0 -30
  163. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerEvents.m +0 -122
  164. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerHeader.h +0 -23
  165. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerManager.h +0 -25
  166. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerManager.m +0 -169
  167. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerRegistry.h +0 -18
  168. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerRegistry.m +0 -49
  169. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerState.h +0 -10
  170. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/LongPressHandler.h +0 -12
  171. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/LongPressHandler.m +0 -100
  172. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/NativeViewHandler.h +0 -15
  173. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/NativeViewHandler.m +0 -163
  174. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PanHandler.h +0 -14
  175. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PanHandler.m +0 -242
  176. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PinchHandler.h +0 -12
  177. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PinchHandler.m +0 -36
  178. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RootViewGestureRecognizer.h +0 -17
  179. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RootViewGestureRecognizer.m +0 -93
  180. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RotationHandler.h +0 -12
  181. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RotationHandler.m +0 -36
  182. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/TapHandler.h +0 -13
  183. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/TapHandler.m +0 -228
  184. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/module.modulemap +0 -5
  185. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/pnpm-lock.yaml +0 -10
  186. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/references.d.ts +0 -3
  187. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/typings/android.d.ts +0 -456
  188. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/typings/extensions.android.d.ts +0 -16
  189. package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/typings/ios.d.ts +0 -266
  190. package/pnpm-global/5/pnpm-lock.yaml +0 -19
  191. package/pnpm-lock.yaml +0 -16
  192. package/react/index.d.ts +0 -20
  193. package/react/index.js +0 -8
@@ -1,597 +0,0 @@
1
- /*
2
- * Copyright (C) 2010 The Android Open Source Project
3
- *
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- *
8
- * http://www.apache.org/licenses/LICENSE-2.0
9
- *
10
- * Unless required by applicable law or agreed to in writing, software
11
- * distributed under the License is distributed on an "AS IS" BASIS,
12
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
- * See the License for the specific language governing permissions and
14
- * limitations under the License.
15
- */
16
-
17
- package com.swmansion.gesturehandler;
18
-
19
- // import android.annotation.UnsupportedAppUsage;
20
- import android.content.Context;
21
- import android.content.res.Resources;
22
- import android.os.Build;
23
- import android.os.Handler;
24
-
25
- import android.view.MotionEvent;
26
- import android.view.ViewConfiguration;
27
- import android.view.GestureDetector;
28
-
29
- /**
30
- * Detects scaling transformation gestures using the supplied
31
- * {@link MotionEvent}s. The {@link OnScaleGestureListener} callback will notify
32
- * users when a particular gesture event has occurred.
33
- *
34
- * This class should only be used with {@link MotionEvent}s reported via touch.
35
- *
36
- * To use this class:
37
- * <ul>
38
- * <li>Create an instance of the {@code ScaleGestureDetector} for your
39
- * {@link View}
40
- * <li>In the {@link View#onTouchEvent(MotionEvent)} method ensure you call
41
- * {@link #onTouchEvent(MotionEvent)}. The methods defined in your callback will
42
- * be executed when the events occur.
43
- * </ul>
44
- */
45
- public class ScaleGestureDetector {
46
- private static final String TAG = "ScaleGestureDetector";
47
-
48
- /**
49
- * The listener for receiving notifications when gestures occur. If you want to
50
- * listen for all the different gestures then implement this interface. If you
51
- * only want to listen for a subset it might be easier to extend
52
- * {@link SimpleOnScaleGestureListener}.
53
- *
54
- * An application will receive events in the following order:
55
- * <ul>
56
- * <li>One {@link OnScaleGestureListener#onScaleBegin(ScaleGestureDetector)}
57
- * <li>Zero or more {@link OnScaleGestureListener#onScale(ScaleGestureDetector)}
58
- * <li>One {@link OnScaleGestureListener#onScaleEnd(ScaleGestureDetector)}
59
- * </ul>
60
- */
61
- public interface OnScaleGestureListener {
62
- /**
63
- * Responds to scaling events for a gesture in progress. Reported by pointer
64
- * motion.
65
- *
66
- * @param detector The detector reporting the event - use this to retrieve
67
- * extended info about event state.
68
- * @return Whether or not the detector should consider this event as handled. If
69
- * an event was not handled, the detector will continue to accumulate
70
- * movement until an event is handled. This can be useful if an
71
- * application, for example, only wants to update scaling factors if the
72
- * change is greater than 0.01.
73
- */
74
- public boolean onScale(ScaleGestureDetector detector);
75
-
76
- /**
77
- * Responds to the beginning of a scaling gesture. Reported by new pointers
78
- * going down.
79
- *
80
- * @param detector The detector reporting the event - use this to retrieve
81
- * extended info about event state.
82
- * @return Whether or not the detector should continue recognizing this gesture.
83
- * For example, if a gesture is beginning with a focal point outside of
84
- * a region where it makes sense, onScaleBegin() may return false to
85
- * ignore the rest of the gesture.
86
- */
87
- public boolean onScaleBegin(ScaleGestureDetector detector);
88
-
89
- /**
90
- * Responds to the end of a scale gesture. Reported by existing pointers going
91
- * up.
92
- *
93
- * Once a scale has ended, {@link ScaleGestureDetector#getFocusX()} and
94
- * {@link ScaleGestureDetector#getFocusY()} will return focal point of the
95
- * pointers remaining on the screen.
96
- *
97
- * @param detector The detector reporting the event - use this to retrieve
98
- * extended info about event state.
99
- */
100
- public void onScaleEnd(ScaleGestureDetector detector);
101
- }
102
-
103
- /**
104
- * A convenience class to extend when you only want to listen for a subset of
105
- * scaling-related events. This implements all methods in
106
- * {@link OnScaleGestureListener} but does nothing.
107
- * {@link OnScaleGestureListener#onScale(ScaleGestureDetector)} returns
108
- * {@code false} so that a subclass can retrieve the accumulated scale factor in
109
- * an overridden onScaleEnd.
110
- * {@link OnScaleGestureListener#onScaleBegin(ScaleGestureDetector)} returns
111
- * {@code true}.
112
- */
113
- public static class SimpleOnScaleGestureListener implements OnScaleGestureListener {
114
-
115
- public boolean onScale(ScaleGestureDetector detector) {
116
- return false;
117
- }
118
-
119
- public boolean onScaleBegin(ScaleGestureDetector detector) {
120
- return true;
121
- }
122
-
123
- public void onScaleEnd(ScaleGestureDetector detector) {
124
- // Intentionally empty
125
- }
126
- }
127
-
128
- private final Context mContext;
129
- // @UnsupportedAppUsage
130
- private final OnScaleGestureListener mListener;
131
-
132
- private float mFocusX;
133
- private float mFocusY;
134
-
135
- private boolean mQuickScaleEnabled;
136
- private boolean mStylusScaleEnabled;
137
-
138
- private float mCurrSpan;
139
- private float mPrevSpan;
140
- private float mInitialSpan;
141
- private float mCurrSpanX;
142
- private float mCurrSpanY;
143
- private float mPrevSpanX;
144
- private float mPrevSpanY;
145
- private long mCurrTime;
146
- private long mPrevTime;
147
- private boolean mInProgress;
148
- // @UnsupportedAppUsage
149
- private int mSpanSlop;
150
- // @UnsupportedAppUsage
151
- private int mMinSpan;
152
-
153
- private final Handler mHandler;
154
-
155
- private float mAnchoredScaleStartX;
156
- private float mAnchoredScaleStartY;
157
- private int mAnchoredScaleMode = ANCHORED_SCALE_MODE_NONE;
158
-
159
- private static final long TOUCH_STABILIZE_TIME = 128; // ms
160
- private static final float SCALE_FACTOR = .5f;
161
- private static final int ANCHORED_SCALE_MODE_NONE = 0;
162
- private static final int ANCHORED_SCALE_MODE_DOUBLE_TAP = 1;
163
- private static final int ANCHORED_SCALE_MODE_STYLUS = 2;
164
-
165
- /**
166
- * Consistency verifier for debugging purposes.
167
- */
168
- // private final InputEventConsistencyVerifier mInputEventConsistencyVerifier =
169
- // InputEventConsistencyVerifier.isInstrumentationEnabled() ?
170
- // new InputEventConsistencyVerifier(this, 0) : null;
171
- private GestureDetector mGestureDetector;
172
-
173
- private boolean mEventBeforeOrAboveStartingGestureEvent;
174
-
175
- /**
176
- * Creates a ScaleGestureDetector with the supplied listener. You may only use
177
- * this constructor from a {@link android.os.Looper Looper} thread.
178
- *
179
- * @param context the application's context
180
- * @param listener the listener invoked for all the callbacks, this must not be
181
- * null.
182
- *
183
- * @throws NullPointerException if {@code listener} is null.
184
- */
185
- public ScaleGestureDetector(Context context, OnScaleGestureListener listener) {
186
- this(context, listener, null);
187
- }
188
-
189
- /**
190
- * Creates a ScaleGestureDetector with the supplied listener.
191
- *
192
- * @see android.os.Handler#Handler()
193
- *
194
- * @param context the application's context
195
- * @param listener the listener invoked for all the callbacks, this must not be
196
- * null.
197
- * @param handler the handler to use for running deferred listener events.
198
- *
199
- * @throws NullPointerException if {@code listener} is null.
200
- */
201
- public ScaleGestureDetector(Context context, OnScaleGestureListener listener, Handler handler) {
202
- mContext = context;
203
- mListener = listener;
204
- mSpanSlop = ViewConfiguration.get(context).getScaledTouchSlop() * 2;
205
-
206
- final Resources res = context.getResources();
207
- mMinSpan = res.getDimensionPixelSize(R.dimen.config_minPinchSpan);
208
- mHandler = handler;
209
- // Quick scale is enabled by default after JB_MR2
210
- final int targetSdkVersion = context.getApplicationInfo().targetSdkVersion;
211
- if (targetSdkVersion > Build.VERSION_CODES.JELLY_BEAN_MR2) {
212
- setQuickScaleEnabled(true);
213
- }
214
- // Stylus scale is enabled by default after LOLLIPOP_MR1
215
- if (targetSdkVersion > Build.VERSION_CODES.LOLLIPOP_MR1) {
216
- setStylusScaleEnabled(true);
217
- }
218
- }
219
-
220
- /**
221
- * Accepts MotionEvents and dispatches events to a
222
- * {@link OnScaleGestureListener} when appropriate.
223
- *
224
- * <p>
225
- * Applications should pass a complete and consistent event stream to this
226
- * method. A complete and consistent event stream involves all MotionEvents from
227
- * the initial ACTION_DOWN to the final ACTION_UP or ACTION_CANCEL.
228
- * </p>
229
- *
230
- * @param event The event to process
231
- * @return true if the event was processed and the detector wants to receive the
232
- * rest of the MotionEvents in this event stream.
233
- */
234
- public boolean onTouchEvent(MotionEvent event) {
235
- // if (mInputEventConsistencyVerifier != null) {
236
- // mInputEventConsistencyVerifier.onTouchEvent(event, 0);
237
- // }
238
-
239
- mCurrTime = event.getEventTime();
240
-
241
- final int action = event.getActionMasked();
242
-
243
- // Forward the event to check for double tap gesture
244
- if (mQuickScaleEnabled) {
245
- mGestureDetector.onTouchEvent(event);
246
- }
247
-
248
- final int count = event.getPointerCount();
249
- final boolean isStylusButtonDown = (event.getButtonState() & MotionEvent.BUTTON_STYLUS_PRIMARY) != 0;
250
-
251
- final boolean anchoredScaleCancelled = mAnchoredScaleMode == ANCHORED_SCALE_MODE_STYLUS && !isStylusButtonDown;
252
- final boolean streamComplete = action == MotionEvent.ACTION_UP || action == MotionEvent.ACTION_CANCEL
253
- || anchoredScaleCancelled;
254
-
255
- if (action == MotionEvent.ACTION_DOWN || streamComplete) {
256
- // Reset any scale in progress with the listener.
257
- // If it's an ACTION_DOWN we're beginning a new event stream.
258
- // This means the app probably didn't give us all the events. Shame on it.
259
- if (mInProgress) {
260
- mListener.onScaleEnd(this);
261
- mInProgress = false;
262
- mInitialSpan = 0;
263
- mAnchoredScaleMode = ANCHORED_SCALE_MODE_NONE;
264
- } else if (inAnchoredScaleMode() && streamComplete) {
265
- mInProgress = false;
266
- mInitialSpan = 0;
267
- mAnchoredScaleMode = ANCHORED_SCALE_MODE_NONE;
268
- }
269
-
270
- if (streamComplete) {
271
- return true;
272
- }
273
- }
274
-
275
- if (!mInProgress && mStylusScaleEnabled && !inAnchoredScaleMode() && !streamComplete && isStylusButtonDown) {
276
- // Start of a button scale gesture
277
- mAnchoredScaleStartX = event.getX();
278
- mAnchoredScaleStartY = event.getY();
279
- mAnchoredScaleMode = ANCHORED_SCALE_MODE_STYLUS;
280
- mInitialSpan = 0;
281
- }
282
-
283
- final boolean configChanged = action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_POINTER_UP
284
- || action == MotionEvent.ACTION_POINTER_DOWN || anchoredScaleCancelled;
285
-
286
- final boolean pointerUp = action == MotionEvent.ACTION_POINTER_UP;
287
- final int skipIndex = pointerUp ? event.getActionIndex() : -1;
288
-
289
- // Determine focal point
290
- float sumX = 0, sumY = 0;
291
- final int div = pointerUp ? count - 1 : count;
292
- final float focusX;
293
- final float focusY;
294
- if (inAnchoredScaleMode()) {
295
- // In anchored scale mode, the focal pt is always where the double tap
296
- // or button down gesture started
297
- focusX = mAnchoredScaleStartX;
298
- focusY = mAnchoredScaleStartY;
299
- if (event.getY() < focusY) {
300
- mEventBeforeOrAboveStartingGestureEvent = true;
301
- } else {
302
- mEventBeforeOrAboveStartingGestureEvent = false;
303
- }
304
- } else {
305
- for (int i = 0; i < count; i++) {
306
- if (skipIndex == i)
307
- continue;
308
- sumX += event.getX(i);
309
- sumY += event.getY(i);
310
- }
311
-
312
- focusX = sumX / div;
313
- focusY = sumY / div;
314
- }
315
-
316
- // Determine average deviation from focal point
317
- float devSumX = 0, devSumY = 0;
318
- for (int i = 0; i < count; i++) {
319
- if (skipIndex == i)
320
- continue;
321
-
322
- // Convert the resulting diameter into a radius.
323
- devSumX += Math.abs(event.getX(i) - focusX);
324
- devSumY += Math.abs(event.getY(i) - focusY);
325
- }
326
- final float devX = devSumX / div;
327
- final float devY = devSumY / div;
328
-
329
- // Span is the average distance between touch points through the focal point;
330
- // i.e. the diameter of the circle with a radius of the average deviation from
331
- // the focal point.
332
- final float spanX = devX * 2;
333
- final float spanY = devY * 2;
334
- final float span;
335
- if (inAnchoredScaleMode()) {
336
- span = spanY;
337
- } else {
338
- span = (float) Math.hypot(spanX, spanY);
339
- }
340
-
341
- // Dispatch begin/end events as needed.
342
- // If the configuration changes, notify the app to reset its current state by
343
- // beginning
344
- // a fresh scale event stream.
345
- final boolean wasInProgress = mInProgress;
346
- mFocusX = focusX;
347
- mFocusY = focusY;
348
- if (!inAnchoredScaleMode() && mInProgress && (span < mMinSpan || configChanged)) {
349
- mListener.onScaleEnd(this);
350
- mInProgress = false;
351
- mInitialSpan = span;
352
- }
353
- if (configChanged) {
354
- mPrevSpanX = mCurrSpanX = spanX;
355
- mPrevSpanY = mCurrSpanY = spanY;
356
- mInitialSpan = mPrevSpan = mCurrSpan = span;
357
- }
358
-
359
- final int minSpan = inAnchoredScaleMode() ? mSpanSlop : mMinSpan;
360
- if (!mInProgress && span >= minSpan && (wasInProgress || Math.abs(span - mInitialSpan) > mSpanSlop)) {
361
- mPrevSpanX = mCurrSpanX = spanX;
362
- mPrevSpanY = mCurrSpanY = spanY;
363
- mPrevSpan = mCurrSpan = span;
364
- mPrevTime = mCurrTime;
365
- mInProgress = mListener.onScaleBegin(this);
366
- }
367
-
368
- // Handle motion; focal point and span/scale factor are changing.
369
- if (action == MotionEvent.ACTION_MOVE) {
370
- mCurrSpanX = spanX;
371
- mCurrSpanY = spanY;
372
- mCurrSpan = span;
373
-
374
- boolean updatePrev = true;
375
-
376
- if (mInProgress) {
377
- updatePrev = mListener.onScale(this);
378
- }
379
-
380
- if (updatePrev) {
381
- mPrevSpanX = mCurrSpanX;
382
- mPrevSpanY = mCurrSpanY;
383
- mPrevSpan = mCurrSpan;
384
- mPrevTime = mCurrTime;
385
- }
386
- }
387
-
388
- return true;
389
- }
390
-
391
- private boolean inAnchoredScaleMode() {
392
- return mAnchoredScaleMode != ANCHORED_SCALE_MODE_NONE;
393
- }
394
-
395
- /**
396
- * Set whether the associated {@link OnScaleGestureListener} should receive
397
- * onScale callbacks when the user performs a doubleTap followed by a swipe.
398
- * Note that this is enabled by default if the app targets API 19 and newer.
399
- *
400
- * @param scales true to enable quick scaling, false to disable
401
- */
402
- public void setQuickScaleEnabled(boolean scales) {
403
- mQuickScaleEnabled = scales;
404
- if (mQuickScaleEnabled && mGestureDetector == null) {
405
- GestureDetector.SimpleOnGestureListener gestureListener = new GestureDetector.SimpleOnGestureListener() {
406
- @Override
407
- public boolean onDoubleTap(MotionEvent e) {
408
- // Double tap: start watching for a swipe
409
- mAnchoredScaleStartX = e.getX();
410
- mAnchoredScaleStartY = e.getY();
411
- mAnchoredScaleMode = ANCHORED_SCALE_MODE_DOUBLE_TAP;
412
- return true;
413
- }
414
- };
415
- mGestureDetector = new GestureDetector(mContext, gestureListener, mHandler);
416
- }
417
- }
418
-
419
- /**
420
- * Return whether the quick scale gesture, in which the user performs a double
421
- * tap followed by a swipe, should perform scaling.
422
- * {@see #setQuickScaleEnabled(boolean)}.
423
- */
424
- public boolean isQuickScaleEnabled() {
425
- return mQuickScaleEnabled;
426
- }
427
-
428
- /**
429
- * Sets whether the associates {@link OnScaleGestureListener} should receive
430
- * onScale callbacks when the user uses a stylus and presses the button. Note
431
- * that this is enabled by default if the app targets API 23 and newer.
432
- *
433
- * @param scales true to enable stylus scaling, false to disable.
434
- */
435
- public void setStylusScaleEnabled(boolean scales) {
436
- mStylusScaleEnabled = scales;
437
- }
438
-
439
- /**
440
- * Return whether the stylus scale gesture, in which the user uses a stylus and
441
- * presses the button, should perform scaling.
442
- * {@see #setStylusScaleEnabled(boolean)}
443
- */
444
- public boolean isStylusScaleEnabled() {
445
- return mStylusScaleEnabled;
446
- }
447
-
448
- /**
449
- * Returns {@code true} if a scale gesture is in progress.
450
- */
451
- public boolean isInProgress() {
452
- return mInProgress;
453
- }
454
-
455
- public float getSpanSlop() {
456
- return mSpanSlop;
457
- }
458
-
459
- public void setSpanSlop(int value) {
460
- mSpanSlop = value;
461
- }
462
-
463
- public float getMinSpan() {
464
- return mMinSpan;
465
- }
466
-
467
- public void setMinSpan(int value) {
468
- mMinSpan = value;
469
- }
470
-
471
- /**
472
- * Get the X coordinate of the current gesture's focal point. If a gesture is in
473
- * progress, the focal point is between each of the pointers forming the
474
- * gesture.
475
- *
476
- * If {@link #isInProgress()} would return false, the result of this function is
477
- * undefined.
478
- *
479
- * @return X coordinate of the focal point in pixels.
480
- */
481
- public float getFocusX() {
482
- return mFocusX;
483
- }
484
-
485
- /**
486
- * Get the Y coordinate of the current gesture's focal point. If a gesture is in
487
- * progress, the focal point is between each of the pointers forming the
488
- * gesture.
489
- *
490
- * If {@link #isInProgress()} would return false, the result of this function is
491
- * undefined.
492
- *
493
- * @return Y coordinate of the focal point in pixels.
494
- */
495
- public float getFocusY() {
496
- return mFocusY;
497
- }
498
-
499
- /**
500
- * Return the average distance between each of the pointers forming the gesture
501
- * in progress through the focal point.
502
- *
503
- * @return Distance between pointers in pixels.
504
- */
505
- public float getCurrentSpan() {
506
- return mCurrSpan;
507
- }
508
-
509
- /**
510
- * Return the average X distance between each of the pointers forming the
511
- * gesture in progress through the focal point.
512
- *
513
- * @return Distance between pointers in pixels.
514
- */
515
- public float getCurrentSpanX() {
516
- return mCurrSpanX;
517
- }
518
-
519
- /**
520
- * Return the average Y distance between each of the pointers forming the
521
- * gesture in progress through the focal point.
522
- *
523
- * @return Distance between pointers in pixels.
524
- */
525
- public float getCurrentSpanY() {
526
- return mCurrSpanY;
527
- }
528
-
529
- /**
530
- * Return the previous average distance between each of the pointers forming the
531
- * gesture in progress through the focal point.
532
- *
533
- * @return Previous distance between pointers in pixels.
534
- */
535
- public float getPreviousSpan() {
536
- return mPrevSpan;
537
- }
538
-
539
- /**
540
- * Return the previous average X distance between each of the pointers forming
541
- * the gesture in progress through the focal point.
542
- *
543
- * @return Previous distance between pointers in pixels.
544
- */
545
- public float getPreviousSpanX() {
546
- return mPrevSpanX;
547
- }
548
-
549
- /**
550
- * Return the previous average Y distance between each of the pointers forming
551
- * the gesture in progress through the focal point.
552
- *
553
- * @return Previous distance between pointers in pixels.
554
- */
555
- public float getPreviousSpanY() {
556
- return mPrevSpanY;
557
- }
558
-
559
- /**
560
- * Return the scaling factor from the previous scale event to the current event.
561
- * This value is defined as ({@link #getCurrentSpan()} /
562
- * {@link #getPreviousSpan()}).
563
- *
564
- * @return The current scaling factor.
565
- */
566
- public float getScaleFactor() {
567
- if (inAnchoredScaleMode()) {
568
- // Drag is moving up; the further away from the gesture
569
- // start, the smaller the span should be, the closer,
570
- // the larger the span, and therefore the larger the scale
571
- final boolean scaleUp = (mEventBeforeOrAboveStartingGestureEvent && (mCurrSpan < mPrevSpan))
572
- || (!mEventBeforeOrAboveStartingGestureEvent && (mCurrSpan > mPrevSpan));
573
- final float spanDiff = (Math.abs(1 - (mCurrSpan / mPrevSpan)) * SCALE_FACTOR);
574
- return mPrevSpan <= 0 ? 1 : scaleUp ? (1 + spanDiff) : (1 - spanDiff);
575
- }
576
- return mPrevSpan > 0 ? mCurrSpan / mPrevSpan : 1;
577
- }
578
-
579
- /**
580
- * Return the time difference in milliseconds between the previous accepted
581
- * scaling event and the current scaling event.
582
- *
583
- * @return Time difference since the last scaling event in milliseconds.
584
- */
585
- public long getTimeDelta() {
586
- return mCurrTime - mPrevTime;
587
- }
588
-
589
- /**
590
- * Return the event time of the current event being processed.
591
- *
592
- * @return Current event time in milliseconds.
593
- */
594
- public long getEventTime() {
595
- return mCurrTime;
596
- }
597
- }