@onekeyfe/react-native-pager-view 3.0.167 → 3.0.168
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.
|
@@ -695,13 +695,13 @@ private class NativeScrollerRefreshLayout(context: Context) : SwipeRefreshLayout
|
|
|
695
695
|
ancestor = ancestor.parent as? View
|
|
696
696
|
}
|
|
697
697
|
intercepted = false
|
|
698
|
-
} else if (event.actionMasked == MotionEvent.ACTION_MOVE && (!smoothPagerGesture || !vertical)) {
|
|
698
|
+
} else if (event.actionMasked == MotionEvent.ACTION_MOVE && (!smoothPagerGesture || (!vertical && !horizontal))) {
|
|
699
699
|
val dx = abs(event.x - downX)
|
|
700
700
|
val dy = abs(event.y - downY)
|
|
701
701
|
if (smoothPagerGesture && dy > slop && dy > dx) {
|
|
702
702
|
vertical = true
|
|
703
703
|
horizontal = false
|
|
704
|
-
} else if (
|
|
704
|
+
} else if ((if (smoothPagerGesture) dx >= 32f * resources.displayMetrics.density else dx > slop) && dx > dy) {
|
|
705
705
|
horizontal = true
|
|
706
706
|
}
|
|
707
707
|
}
|
package/docs/SPEC.md
CHANGED
|
@@ -244,6 +244,13 @@ of the refresh boundary. Dispatch MUST still observe child-owned movement; only
|
|
|
244
244
|
a confirmed vertical Smooth Home gesture may release the viewport's child
|
|
245
245
|
interception prohibition. Pending and horizontal movement MUST preserve it.
|
|
246
246
|
|
|
247
|
+
In smooth-header mode, Android's NativeScroller refresh boundary MUST retain a
|
|
248
|
+
confirmed horizontal or vertical direction until the touch sequence ends or is
|
|
249
|
+
cancelled. It MUST classify MOVE direction only while neither direction is confirmed,
|
|
250
|
+
and horizontal confirmation MUST include the 32 dp boundary, matching the
|
|
251
|
+
viewport. Later vertical movement after confirmed horizontal intent MUST NOT
|
|
252
|
+
start a refresh gesture. Non-smooth refresh direction behavior remains unchanged.
|
|
253
|
+
|
|
247
254
|
iOS nested horizontal ownership MUST include enabled nonpaging horizontal-only
|
|
248
255
|
ScrollViews, with content wider than bounds and no vertical content overflow.
|
|
249
256
|
Both pan holding and failure dependencies MUST use the same eligibility. A
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/react-native-pager-view",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.168",
|
|
4
4
|
"description": "React Native wrapper for Android and iOS ViewPager",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "./lib/module/index.js",
|
|
@@ -72,7 +72,7 @@
|
|
|
72
72
|
"typescript": "^5.9.2"
|
|
73
73
|
},
|
|
74
74
|
"peerDependencies": {
|
|
75
|
-
"@onekeyfe/react-native-native-logger": "3.0.
|
|
75
|
+
"@onekeyfe/react-native-native-logger": "3.0.168",
|
|
76
76
|
"react": "*",
|
|
77
77
|
"react-native": "*"
|
|
78
78
|
},
|