@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.
- package/CHANGELOG.md +38 -0
- package/README.md +149 -90
- package/angular/bundles/nativescript-community-ui-drawer-angular.umd.js +54 -31
- package/angular/esm2015/index.js +1 -1
- package/angular/esm2015/module.js +11 -10
- package/angular/esm2015/nativescript-community-ui-drawer-angular.js +1 -1
- package/angular/fesm2015/nativescript-community-ui-drawer-angular.js +34 -32
- package/angular/module.d.ts +15 -14
- package/angular/package.json +3 -3
- package/index.js +15 -10
- package/package.json +11 -3
- package/vue/index.js +1 -1
- package/angular/bundles/nativescript-community-ui-drawer-angular.umd.min.js +0 -2
- package/pnpm-global/5/node_modules/.modules.yaml +0 -24
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/CHANGELOG.md +0 -467
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/LICENSE +0 -201
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/README.md +0 -56
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.d.ts +0 -155
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.js +0 -535
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.d.ts +0 -93
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.js +0 -222
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.d.ts +0 -149
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.d.ts +0 -53
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.js +0 -253
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gestures_override.d.ts +0 -27
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/gestures_override.js +0 -263
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/package.json +0 -39
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/AndroidManifest.xml +0 -2
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/platforms/android/include.gradle +0 -9
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- 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
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/pnpm-lock.yaml +0 -10
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/references.d.ts +0 -3
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/typings/android.d.ts +0 -456
- 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
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/gesturehandler/typings/ios.d.ts +0 -266
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/CHANGELOG.md +0 -94
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/LICENSE +0 -201
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/README.md +0 -17
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observable.d.ts +0 -17
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observable.js +0 -37
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observablearray.d.ts +0 -10
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/observablearray.js +0 -224
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+gesturehandler@0.1.41/node_modules/@nativescript-community/observable/package.json +0 -31
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/CHANGELOG.md +0 -94
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/LICENSE +0 -201
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/README.md +0 -17
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observable.d.ts +0 -17
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observable.js +0 -37
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observablearray.d.ts +0 -10
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/observablearray.js +0 -224
- package/pnpm-global/5/node_modules/.pnpm/@nativescript-community+observable@2.0.9/node_modules/@nativescript-community/observable/package.json +0 -31
- package/pnpm-global/5/node_modules/.pnpm/lock.yaml +0 -19
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/CHANGELOG.md +0 -94
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/LICENSE +0 -201
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/README.md +0 -17
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observable.d.ts +0 -17
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observable.js +0 -37
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observablearray.d.ts +0 -10
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/observablearray.js +0 -224
- package/pnpm-global/5/node_modules/.pnpm/node_modules/@nativescript-community/observable/package.json +0 -31
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/CHANGELOG.md +0 -467
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/LICENSE +0 -201
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/README.md +0 -56
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.d.ts +0 -155
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.android.js +0 -535
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.d.ts +0 -93
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.common.js +0 -222
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.d.ts +0 -149
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.d.ts +0 -53
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gesturehandler.ios.js +0 -253
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gestures_override.d.ts +0 -27
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/gestures_override.js +0 -263
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/package.json +0 -39
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/AndroidManifest.xml +0 -2
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/include.gradle +0 -9
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/GestureHandlerInteractionController.java +0 -79
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/PageLayout.java +0 -169
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/nativescript/gesturehandler/RootViewGestureHandler.java +0 -45
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/BaseGestureHandlerInteractionController.java +0 -19
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/FlingGestureHandler.java +0 -125
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandler.java +0 -541
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerInteractionController.java +0 -11
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerOrchestrator.java +0 -569
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerRegistry.java +0 -10
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureHandlerRegistryImpl.java +0 -97
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/GestureUtils.java +0 -51
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/LongPressGestureHandler.java +0 -77
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/NativeViewGestureHandler.java +0 -141
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/OnTouchEventListener.java +0 -11
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PanGestureHandler.java +0 -320
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PinchGestureHandler.java +0 -138
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEvents.java +0 -25
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEventsConfig.java +0 -25
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/PointerEventsSpec.java +0 -25
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/RotationGestureDetector.java +0 -171
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/RotationGestureHandler.java +0 -96
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/ScaleGestureDetector.java +0 -597
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/TapGestureHandler.java +0 -176
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/java/com/swmansion/gesturehandler/ViewConfigurationHelper.java +0 -12
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/android/res/values/config.xml +0 -13
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/FlingHandler.h +0 -6
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/FlingHandler.m +0 -131
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/ForceTouchHandler.h +0 -4
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/ForceTouchHandler.m +0 -170
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandler.h +0 -98
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandler.m +0 -365
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerDirection.h +0 -8
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerEvents.h +0 -30
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerEvents.m +0 -122
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerHeader.h +0 -23
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerManager.h +0 -25
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerManager.m +0 -169
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerRegistry.h +0 -18
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerRegistry.m +0 -49
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/GestureHandlerState.h +0 -10
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/LongPressHandler.h +0 -12
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/LongPressHandler.m +0 -100
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/NativeViewHandler.h +0 -15
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/NativeViewHandler.m +0 -163
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PanHandler.h +0 -14
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PanHandler.m +0 -242
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PinchHandler.h +0 -12
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/PinchHandler.m +0 -36
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RootViewGestureRecognizer.h +0 -17
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RootViewGestureRecognizer.m +0 -93
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RotationHandler.h +0 -12
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/RotationHandler.m +0 -36
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/TapHandler.h +0 -13
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/TapHandler.m +0 -228
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/platforms/ios/src/module.modulemap +0 -5
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/pnpm-lock.yaml +0 -10
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/references.d.ts +0 -3
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/typings/android.d.ts +0 -456
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/typings/extensions.android.d.ts +0 -16
- package/pnpm-global/5/node_modules/@nativescript-community/gesturehandler/typings/ios.d.ts +0 -266
- package/pnpm-global/5/pnpm-lock.yaml +0 -19
- package/pnpm-lock.yaml +0 -16
- package/react/index.d.ts +0 -20
- package/react/index.js +0 -8
@@ -1,138 +0,0 @@
|
|
1
|
-
package com.swmansion.gesturehandler;
|
2
|
-
|
3
|
-
import android.content.Context;
|
4
|
-
import android.view.MotionEvent;
|
5
|
-
import android.view.ViewConfiguration;
|
6
|
-
|
7
|
-
public class PinchGestureHandler extends GestureHandler<PinchGestureHandler> {
|
8
|
-
|
9
|
-
private ScaleGestureDetector mScaleGestureDetector;
|
10
|
-
private double mLastScaleFactor;
|
11
|
-
private double mLastVelocity;
|
12
|
-
|
13
|
-
private float mStartingSpan;
|
14
|
-
private int mSpanSlop = -1;
|
15
|
-
private int mMinSpan = -1;
|
16
|
-
|
17
|
-
private ScaleGestureDetector.OnScaleGestureListener mGestureListener = new ScaleGestureDetector.OnScaleGestureListener() {
|
18
|
-
|
19
|
-
@Override
|
20
|
-
public boolean onScale(ScaleGestureDetector detector) {
|
21
|
-
double prevScaleFactor = mLastScaleFactor;
|
22
|
-
mLastScaleFactor *= detector.getScaleFactor();
|
23
|
-
long delta = detector.getTimeDelta();
|
24
|
-
if (delta > 0) {
|
25
|
-
mLastVelocity = (mLastScaleFactor - prevScaleFactor) / delta;
|
26
|
-
}
|
27
|
-
if (Math.abs(mStartingSpan - detector.getCurrentSpan()) >= mSpanSlop && getState() == STATE_BEGAN) {
|
28
|
-
activate();
|
29
|
-
}
|
30
|
-
return true;
|
31
|
-
}
|
32
|
-
|
33
|
-
@Override
|
34
|
-
public boolean onScaleBegin(ScaleGestureDetector detector) {
|
35
|
-
mStartingSpan = detector.getCurrentSpan();
|
36
|
-
return true;
|
37
|
-
}
|
38
|
-
|
39
|
-
@Override
|
40
|
-
public void onScaleEnd(ScaleGestureDetector detector) {
|
41
|
-
// ScaleGestureDetector thinks that when fingers are 27mm away that's a
|
42
|
-
// sufficiently good
|
43
|
-
// reason to trigger this method giving us no other choice but to ignore it
|
44
|
-
// completely.
|
45
|
-
}
|
46
|
-
};
|
47
|
-
|
48
|
-
public PinchGestureHandler() {
|
49
|
-
setShouldCancelWhenOutside(false);
|
50
|
-
}
|
51
|
-
|
52
|
-
@Override
|
53
|
-
protected void onHandle(MotionEvent event) {
|
54
|
-
|
55
|
-
if (getState() == STATE_UNDETERMINED) {
|
56
|
-
Context context = getView().getContext();
|
57
|
-
mLastVelocity = 0f;
|
58
|
-
mLastScaleFactor = 1f;
|
59
|
-
mScaleGestureDetector = new ScaleGestureDetector(context, mGestureListener);
|
60
|
-
if (mSpanSlop != -1) {
|
61
|
-
mScaleGestureDetector.setSpanSlop(mSpanSlop);
|
62
|
-
}
|
63
|
-
if (mMinSpan != -1) {
|
64
|
-
mScaleGestureDetector.setMinSpan(mMinSpan);
|
65
|
-
}
|
66
|
-
|
67
|
-
begin();
|
68
|
-
}
|
69
|
-
|
70
|
-
if (mScaleGestureDetector != null) {
|
71
|
-
mScaleGestureDetector.onTouchEvent(event);
|
72
|
-
}
|
73
|
-
|
74
|
-
int activePointers = event.getPointerCount();
|
75
|
-
if (event.getActionMasked() == MotionEvent.ACTION_POINTER_UP) {
|
76
|
-
activePointers -= 1;
|
77
|
-
}
|
78
|
-
|
79
|
-
if (getState() == STATE_ACTIVE && activePointers < 2) {
|
80
|
-
end();
|
81
|
-
} else if (event.getActionMasked() == MotionEvent.ACTION_UP) {
|
82
|
-
fail();
|
83
|
-
}
|
84
|
-
}
|
85
|
-
|
86
|
-
@Override
|
87
|
-
protected void onReset() {
|
88
|
-
mScaleGestureDetector = null;
|
89
|
-
mLastVelocity = 0f;
|
90
|
-
mLastScaleFactor = 1f;
|
91
|
-
}
|
92
|
-
|
93
|
-
public double getScale() {
|
94
|
-
return mLastScaleFactor;
|
95
|
-
}
|
96
|
-
|
97
|
-
public double getVelocity() {
|
98
|
-
return mLastVelocity;
|
99
|
-
}
|
100
|
-
|
101
|
-
public float getMinSpan() {
|
102
|
-
return (float) mMinSpan;
|
103
|
-
}
|
104
|
-
|
105
|
-
public PinchGestureHandler setMinSpan(float value) {
|
106
|
-
mMinSpan = (int) value;
|
107
|
-
if (mScaleGestureDetector != null) {
|
108
|
-
mScaleGestureDetector.setMinSpan(mMinSpan);
|
109
|
-
}
|
110
|
-
return this;
|
111
|
-
}
|
112
|
-
|
113
|
-
public float getSpanSlop() {
|
114
|
-
return (float) mSpanSlop;
|
115
|
-
}
|
116
|
-
|
117
|
-
public PinchGestureHandler setSpanSlop(float value) {
|
118
|
-
mSpanSlop = (int) value;
|
119
|
-
if (mScaleGestureDetector != null) {
|
120
|
-
mScaleGestureDetector.setSpanSlop(mSpanSlop);
|
121
|
-
}
|
122
|
-
return this;
|
123
|
-
}
|
124
|
-
|
125
|
-
public float getFocalPointX() {
|
126
|
-
if (mScaleGestureDetector == null) {
|
127
|
-
return Float.NaN;
|
128
|
-
}
|
129
|
-
return mScaleGestureDetector.getFocusX();
|
130
|
-
}
|
131
|
-
|
132
|
-
public float getFocalPointY() {
|
133
|
-
if (mScaleGestureDetector == null) {
|
134
|
-
return Float.NaN;
|
135
|
-
}
|
136
|
-
return mScaleGestureDetector.getFocusY();
|
137
|
-
}
|
138
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
package com.swmansion.gesturehandler;
|
2
|
-
|
3
|
-
public enum PointerEvents {
|
4
|
-
|
5
|
-
/**
|
6
|
-
* Neither the container nor its children receive events.
|
7
|
-
*/
|
8
|
-
NONE,
|
9
|
-
|
10
|
-
/**
|
11
|
-
* Container doesn't get events but all of its children do.
|
12
|
-
*/
|
13
|
-
BOX_NONE,
|
14
|
-
|
15
|
-
/**
|
16
|
-
* Container gets events but none of its children do.
|
17
|
-
*/
|
18
|
-
BOX_ONLY,
|
19
|
-
|
20
|
-
/**
|
21
|
-
* Container and all of its children receive touch events (like pointerEvents is
|
22
|
-
* unspecified).
|
23
|
-
*/
|
24
|
-
AUTO,;
|
25
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
package com.swmansion.gesturehandler;
|
2
|
-
|
3
|
-
public enum PointerEventsConfig {
|
4
|
-
|
5
|
-
/**
|
6
|
-
* Neither the container nor its children receive events.
|
7
|
-
*/
|
8
|
-
NONE,
|
9
|
-
|
10
|
-
/**
|
11
|
-
* Container doesn't get events but all of its children do.
|
12
|
-
*/
|
13
|
-
BOX_NONE,
|
14
|
-
|
15
|
-
/**
|
16
|
-
* Container gets events but none of its children do.
|
17
|
-
*/
|
18
|
-
BOX_ONLY,
|
19
|
-
|
20
|
-
/**
|
21
|
-
* Container and all of its children receive touch events (like pointerEvents is
|
22
|
-
* unspecified).
|
23
|
-
*/
|
24
|
-
AUTO,;
|
25
|
-
}
|
@@ -1,25 +0,0 @@
|
|
1
|
-
package com.swmansion.gesturehandler;
|
2
|
-
|
3
|
-
public enum PointerEventsSpec {
|
4
|
-
|
5
|
-
/**
|
6
|
-
* Neither the container nor its children receive events.
|
7
|
-
*/
|
8
|
-
NONE,
|
9
|
-
|
10
|
-
/**
|
11
|
-
* Container doesn't get events but all of its children do.
|
12
|
-
*/
|
13
|
-
BOX_NONE,
|
14
|
-
|
15
|
-
/**
|
16
|
-
* Container gets events but none of its children do.
|
17
|
-
*/
|
18
|
-
BOX_ONLY,
|
19
|
-
|
20
|
-
/**
|
21
|
-
* Container and all of its children receive touch events (like pointerEvents is
|
22
|
-
* unspecified).
|
23
|
-
*/
|
24
|
-
AUTO,;
|
25
|
-
}
|
@@ -1,171 +0,0 @@
|
|
1
|
-
package com.swmansion.gesturehandler;
|
2
|
-
|
3
|
-
import android.view.MotionEvent;
|
4
|
-
|
5
|
-
public class RotationGestureDetector {
|
6
|
-
|
7
|
-
public interface OnRotationGestureListener {
|
8
|
-
|
9
|
-
boolean onRotation(RotationGestureDetector detector);
|
10
|
-
|
11
|
-
boolean onRotationBegin(RotationGestureDetector detector);
|
12
|
-
|
13
|
-
void onRotationEnd(RotationGestureDetector detector);
|
14
|
-
}
|
15
|
-
|
16
|
-
private long mCurrTime;
|
17
|
-
private long mPrevTime;
|
18
|
-
private double mPrevAngle;
|
19
|
-
private double mAngleDiff;
|
20
|
-
private float mAnchorX;
|
21
|
-
private float mAnchorY;
|
22
|
-
|
23
|
-
private boolean mInProgress;
|
24
|
-
|
25
|
-
private int mPointerIds[] = new int[2];
|
26
|
-
|
27
|
-
private OnRotationGestureListener mListener;
|
28
|
-
|
29
|
-
public RotationGestureDetector(OnRotationGestureListener listener) {
|
30
|
-
mListener = listener;
|
31
|
-
}
|
32
|
-
|
33
|
-
private void updateCurrent(MotionEvent event) {
|
34
|
-
mPrevTime = mCurrTime;
|
35
|
-
mCurrTime = event.getEventTime();
|
36
|
-
|
37
|
-
int firstPointerIndex = event.findPointerIndex(mPointerIds[0]);
|
38
|
-
int secondPointerIndex = event.findPointerIndex(mPointerIds[1]);
|
39
|
-
|
40
|
-
float firstPtX = event.getX(firstPointerIndex);
|
41
|
-
float firstPtY = event.getY(firstPointerIndex);
|
42
|
-
float secondPtX = event.getX(secondPointerIndex);
|
43
|
-
float secondPtY = event.getY(secondPointerIndex);
|
44
|
-
|
45
|
-
float vectorX = secondPtX - firstPtX;
|
46
|
-
float vectorY = secondPtY - firstPtY;
|
47
|
-
|
48
|
-
mAnchorX = (firstPtX + secondPtX) * 0.5f;
|
49
|
-
mAnchorY = (firstPtY + secondPtY) * 0.5f;
|
50
|
-
|
51
|
-
// Angle diff should be positive when rotating in clockwise direction
|
52
|
-
double angle = -Math.atan2(vectorY, vectorX);
|
53
|
-
|
54
|
-
if (Double.isNaN(mPrevAngle)) {
|
55
|
-
mAngleDiff = 0.;
|
56
|
-
} else {
|
57
|
-
mAngleDiff = mPrevAngle - angle;
|
58
|
-
}
|
59
|
-
mPrevAngle = angle;
|
60
|
-
|
61
|
-
if (mAngleDiff > Math.PI) {
|
62
|
-
mAngleDiff -= Math.PI;
|
63
|
-
} else if (mAngleDiff < -Math.PI) {
|
64
|
-
mAngleDiff += Math.PI;
|
65
|
-
}
|
66
|
-
|
67
|
-
if (mAngleDiff > Math.PI / 2.) {
|
68
|
-
mAngleDiff -= Math.PI;
|
69
|
-
} else if (mAngleDiff < -Math.PI / 2.) {
|
70
|
-
mAngleDiff += Math.PI;
|
71
|
-
}
|
72
|
-
}
|
73
|
-
|
74
|
-
private void finish() {
|
75
|
-
if (mInProgress) {
|
76
|
-
mInProgress = false;
|
77
|
-
if (mListener != null) {
|
78
|
-
mListener.onRotationEnd(this);
|
79
|
-
}
|
80
|
-
}
|
81
|
-
}
|
82
|
-
|
83
|
-
public boolean onTouchEvent(MotionEvent event) {
|
84
|
-
switch (event.getActionMasked()) {
|
85
|
-
|
86
|
-
case MotionEvent.ACTION_DOWN:
|
87
|
-
mInProgress = false;
|
88
|
-
mPointerIds[0] = event.getPointerId(event.getActionIndex());
|
89
|
-
mPointerIds[1] = MotionEvent.INVALID_POINTER_ID;
|
90
|
-
break;
|
91
|
-
|
92
|
-
case MotionEvent.ACTION_POINTER_DOWN:
|
93
|
-
if (!mInProgress) {
|
94
|
-
mPointerIds[1] = event.getPointerId(event.getActionIndex());
|
95
|
-
mInProgress = true;
|
96
|
-
mPrevTime = event.getEventTime();
|
97
|
-
mPrevAngle = Double.NaN;
|
98
|
-
updateCurrent(event);
|
99
|
-
if (mListener != null) {
|
100
|
-
mListener.onRotationBegin(this);
|
101
|
-
}
|
102
|
-
}
|
103
|
-
break;
|
104
|
-
|
105
|
-
case MotionEvent.ACTION_MOVE:
|
106
|
-
if (mInProgress) {
|
107
|
-
updateCurrent(event);
|
108
|
-
if (mListener != null) {
|
109
|
-
mListener.onRotation(this);
|
110
|
-
}
|
111
|
-
}
|
112
|
-
break;
|
113
|
-
|
114
|
-
case MotionEvent.ACTION_POINTER_UP:
|
115
|
-
if (mInProgress) {
|
116
|
-
int pointerId = event.getPointerId(event.getActionIndex());
|
117
|
-
if (pointerId == mPointerIds[0] || pointerId == mPointerIds[1]) {
|
118
|
-
// One of the key pointer has been lifted up, we have to end the gesture
|
119
|
-
finish();
|
120
|
-
}
|
121
|
-
}
|
122
|
-
break;
|
123
|
-
|
124
|
-
case MotionEvent.ACTION_UP:
|
125
|
-
finish();
|
126
|
-
break;
|
127
|
-
}
|
128
|
-
return true;
|
129
|
-
}
|
130
|
-
|
131
|
-
/**
|
132
|
-
* Returns rotation in radians since the previous rotation event.
|
133
|
-
*
|
134
|
-
* @return current rotation step in radians.
|
135
|
-
*/
|
136
|
-
public double getRotation() {
|
137
|
-
return mAngleDiff;
|
138
|
-
}
|
139
|
-
|
140
|
-
/**
|
141
|
-
* Return the time difference in milliseconds between the previous accepted
|
142
|
-
* rotation event and the current rotation event.
|
143
|
-
*
|
144
|
-
* @return Time difference since the last rotation event in milliseconds.
|
145
|
-
*/
|
146
|
-
public long getTimeDelta() {
|
147
|
-
return mCurrTime - mPrevTime;
|
148
|
-
}
|
149
|
-
|
150
|
-
/**
|
151
|
-
* Returns X coordinate of the rotation anchor point relative to the view that
|
152
|
-
* the provided motion event coordinates (usually relative to the view event was
|
153
|
-
* sent to).
|
154
|
-
*
|
155
|
-
* @return X coordinate of the rotation anchor point
|
156
|
-
*/
|
157
|
-
public float getAnchorX() {
|
158
|
-
return mAnchorX;
|
159
|
-
}
|
160
|
-
|
161
|
-
/**
|
162
|
-
* Returns Y coordinate of the rotation anchor point relative to the view that
|
163
|
-
* the provided motion event coordinates (usually relative to the view event was
|
164
|
-
* sent to).
|
165
|
-
*
|
166
|
-
* @return Y coordinate of the rotation anchor point
|
167
|
-
*/
|
168
|
-
public float getAnchorY() {
|
169
|
-
return mAnchorY;
|
170
|
-
}
|
171
|
-
}
|
@@ -1,96 +0,0 @@
|
|
1
|
-
package com.swmansion.gesturehandler;
|
2
|
-
|
3
|
-
import android.view.MotionEvent;
|
4
|
-
|
5
|
-
public class RotationGestureHandler extends GestureHandler<RotationGestureHandler> {
|
6
|
-
|
7
|
-
private static final double ROTATION_RECOGNITION_THRESHOLD = Math.PI / 36.; // 5 deg in radians
|
8
|
-
|
9
|
-
private RotationGestureDetector mRotationGestureDetector;
|
10
|
-
private double mLastRotation;
|
11
|
-
private double mLastVelocity;
|
12
|
-
|
13
|
-
private RotationGestureDetector.OnRotationGestureListener mGestureListener = new RotationGestureDetector.OnRotationGestureListener() {
|
14
|
-
|
15
|
-
@Override
|
16
|
-
public boolean onRotation(RotationGestureDetector detector) {
|
17
|
-
double prevRotation = mLastRotation;
|
18
|
-
mLastRotation += detector.getRotation();
|
19
|
-
long delta = detector.getTimeDelta();
|
20
|
-
if (delta > 0) {
|
21
|
-
mLastVelocity = (mLastRotation - prevRotation) / delta;
|
22
|
-
}
|
23
|
-
if (Math.abs(mLastRotation) >= ROTATION_RECOGNITION_THRESHOLD && getState() == STATE_BEGAN) {
|
24
|
-
activate();
|
25
|
-
}
|
26
|
-
return true;
|
27
|
-
}
|
28
|
-
|
29
|
-
@Override
|
30
|
-
public boolean onRotationBegin(RotationGestureDetector detector) {
|
31
|
-
return true;
|
32
|
-
}
|
33
|
-
|
34
|
-
@Override
|
35
|
-
public void onRotationEnd(RotationGestureDetector detector) {
|
36
|
-
end();
|
37
|
-
}
|
38
|
-
};
|
39
|
-
|
40
|
-
public RotationGestureHandler() {
|
41
|
-
setShouldCancelWhenOutside(false);
|
42
|
-
}
|
43
|
-
|
44
|
-
@Override
|
45
|
-
protected void onHandle(MotionEvent event) {
|
46
|
-
int state = getState();
|
47
|
-
if (state == STATE_UNDETERMINED) {
|
48
|
-
mLastVelocity = 0f;
|
49
|
-
mLastRotation = 0f;
|
50
|
-
mRotationGestureDetector = new RotationGestureDetector(mGestureListener);
|
51
|
-
|
52
|
-
begin();
|
53
|
-
}
|
54
|
-
|
55
|
-
if (mRotationGestureDetector != null) {
|
56
|
-
mRotationGestureDetector.onTouchEvent(event);
|
57
|
-
}
|
58
|
-
|
59
|
-
if (event.getActionMasked() == MotionEvent.ACTION_UP) {
|
60
|
-
if (state == STATE_ACTIVE) {
|
61
|
-
end();
|
62
|
-
} else {
|
63
|
-
fail();
|
64
|
-
}
|
65
|
-
}
|
66
|
-
}
|
67
|
-
|
68
|
-
@Override
|
69
|
-
protected void onReset() {
|
70
|
-
mRotationGestureDetector = null;
|
71
|
-
mLastVelocity = 0f;
|
72
|
-
mLastRotation = 0f;
|
73
|
-
}
|
74
|
-
|
75
|
-
public double getRotation() {
|
76
|
-
return mLastRotation;
|
77
|
-
}
|
78
|
-
|
79
|
-
public double getVelocity() {
|
80
|
-
return mLastVelocity;
|
81
|
-
}
|
82
|
-
|
83
|
-
public float getAnchorX() {
|
84
|
-
if (mRotationGestureDetector == null) {
|
85
|
-
return Float.NaN;
|
86
|
-
}
|
87
|
-
return mRotationGestureDetector.getAnchorX();
|
88
|
-
}
|
89
|
-
|
90
|
-
public float getAnchorY() {
|
91
|
-
if (mRotationGestureDetector == null) {
|
92
|
-
return Float.NaN;
|
93
|
-
}
|
94
|
-
return mRotationGestureDetector.getAnchorY();
|
95
|
-
}
|
96
|
-
}
|