@nativescript-community/gesturehandler 2.0.33 → 2.0.36
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nativescript-community/gesturehandler",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.36",
|
|
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": "4614ed6c22844728637d162d6d0f2becd6d08861"
|
|
52
52
|
}
|
|
@@ -1,22 +1,32 @@
|
|
|
1
1
|
import groovy.json.JsonSlurper
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
2
|
+
|
|
3
|
+
// for now we support only @nativescript/core and @akylas/nativescript
|
|
4
|
+
// we should have a more generic way
|
|
5
|
+
def widgetsDir = "$USER_PROJECT_ROOT/node_modules/@nativescript/core/platforms/android"
|
|
6
|
+
def appPackageJsonFile = file("$USER_PROJECT_ROOT/package.json")
|
|
7
|
+
if (appPackageJsonFile.exists()) {
|
|
8
|
+
def appPackageJson = new JsonSlurper().parseText(appPackageJsonFile.text)
|
|
9
|
+
if (appPackageJson.dependencies['@akylas/nativescript'] != null) {
|
|
10
|
+
widgetsDir = "$USER_PROJECT_ROOT/node_modules/@akylas/nativescript/platforms/android"
|
|
5
11
|
}
|
|
6
|
-
implementation "androidx.annotation:annotation:1.1.0"
|
|
7
12
|
}
|
|
8
|
-
|
|
13
|
+
|
|
14
|
+
dependencies {
|
|
15
|
+
implementation "androidx.annotation:annotation:1.1.0"
|
|
16
|
+
|
|
9
17
|
if (project.hasProperty("tempBuild")) {
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
def appPackageJson = new JsonSlurper().parseText(appPackageJsonFile.text)
|
|
14
|
-
if (appPackageJson.dependencies['@akylas/nativescript'] != null) {
|
|
15
|
-
widgetsDir = "$USER_PROJECT_ROOT/node_modules/@akylas/nativescript/platforms/android"
|
|
16
|
-
}
|
|
18
|
+
// if ui-mobile-base is provided as source the name is nativescript.aar
|
|
19
|
+
if (file("$widgetsDir/nativescript.aar").exists()) {
|
|
20
|
+
implementation(name:'nativescript', ext:'aar')
|
|
17
21
|
}
|
|
18
|
-
|
|
19
|
-
|
|
22
|
+
// if ui-mobile-base is provided as aar the name is widget-release.aar
|
|
23
|
+
if (file("$widgetsDir/widget-release.aar").exists()) {
|
|
24
|
+
implementation(name:'widget-release', ext:'aar')
|
|
20
25
|
}
|
|
21
26
|
}
|
|
22
|
-
}
|
|
27
|
+
}
|
|
28
|
+
repositories {
|
|
29
|
+
flatDir {
|
|
30
|
+
dirs "$widgetsDir"
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -226,20 +226,20 @@ public class GestureHandler<T extends GestureHandler> {
|
|
|
226
226
|
if (isTrackingPointer(pointerId)) {
|
|
227
227
|
return;
|
|
228
228
|
}
|
|
229
|
-
|
|
230
|
-
|
|
229
|
+
mTrackedPointerIDs[pointerId] = findNextLocalPointerId();
|
|
230
|
+
mTrackedPointersCount++;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
public void stopTrackingPointer(int pointerId) {
|
|
234
234
|
if (!isTrackingPointer(pointerId)) {
|
|
235
235
|
return;
|
|
236
236
|
}
|
|
237
|
-
|
|
238
|
-
|
|
237
|
+
mTrackedPointerIDs[pointerId] = -1;
|
|
238
|
+
mTrackedPointersCount--;
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
private boolean isTrackingPointer(int pointerId) {
|
|
242
|
-
return
|
|
242
|
+
return mTrackedPointerIDs[pointerId] != -1;
|
|
243
243
|
}
|
|
244
244
|
|
|
245
245
|
private boolean needAdapt(MotionEvent event) {
|