@nativescript-community/gesturehandler 0.2.1 → 2.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
@@ -3,6 +3,25 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
5
5
|
|
6
|
+
## [2.0.1](https://github.com/nativescript-community/gesturehandler/compare/v0.2.2...v2.0.1) (2022-03-31)
|
7
|
+
|
8
|
+
**Note:** Version bump only for package @nativescript-community/gesturehandler
|
9
|
+
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
|
14
|
+
## [0.2.2](https://github.com/nativescript-community/gesturehandler/compare/v0.2.1...v0.2.2) (2022-03-31)
|
15
|
+
|
16
|
+
|
17
|
+
### Bug Fixes
|
18
|
+
|
19
|
+
* **android:** longpress not always recognized ([0ce2ce6](https://github.com/nativescript-community/gesturehandler/commit/0ce2ce681debb8f915467907c54fa9ec55a88f35))
|
20
|
+
|
21
|
+
|
22
|
+
|
23
|
+
|
24
|
+
|
6
25
|
## [0.2.1](https://github.com/nativescript-community/gesturehandler/compare/v0.2.0...v0.2.1) (2022-03-28)
|
7
26
|
|
8
27
|
**Note:** Version bump only for package @nativescript-community/gesturehandler
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@nativescript-community/gesturehandler",
|
3
|
-
"version": "0.
|
3
|
+
"version": "2.0.1",
|
4
4
|
"description": "Declarative API exposing platform native touch and gesture system to NativeScript.",
|
5
5
|
"main": "gesturehandler",
|
6
6
|
"sideEffects": false,
|
@@ -48,5 +48,5 @@
|
|
48
48
|
"dependencies": {
|
49
49
|
"@nativescript-community/observable": "^2.0.10"
|
50
50
|
},
|
51
|
-
"gitHead": "
|
51
|
+
"gitHead": "4f2f1e0e816a9798ee8e780e8932e74daa1f44b5"
|
52
52
|
}
|
@@ -329,11 +329,7 @@ public class GestureHandler<T extends GestureHandler> {
|
|
329
329
|
int action = event.getActionMasked();
|
330
330
|
if(action == MotionEvent.ACTION_DOWN || action == MotionEvent.ACTION_POINTER_DOWN) {
|
331
331
|
if (mListener != null && !mListener.shouldStartGesture((T) this, event)) {
|
332
|
-
|
333
|
-
fail();
|
334
|
-
} else {
|
335
|
-
fail();
|
336
|
-
}
|
332
|
+
fail();
|
337
333
|
if (event != origEvent) {
|
338
334
|
event.recycle();
|
339
335
|
}
|
@@ -60,7 +60,7 @@ public class LongPressGestureHandler extends GestureHandler<LongPressGestureHand
|
|
60
60
|
// calculate distance from start
|
61
61
|
float deltaX = event.getRawX() - mStartX;
|
62
62
|
float deltaY = event.getRawY() - mStartY;
|
63
|
-
float distSq = deltaX * deltaX + deltaY * deltaY;
|
63
|
+
float distSq = (float)Math.sqrt((double)(deltaX * deltaX + deltaY * deltaY));
|
64
64
|
if (distSq > mMaxDistSq) {
|
65
65
|
if (getState() == STATE_ACTIVE) {
|
66
66
|
cancel();
|