@enact/ui 5.3.1 → 5.3.2
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 +4 -0
- package/package.json +3 -3
- package/useScroll/useScroll.js +14 -0
package/CHANGELOG.md
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@enact/ui",
|
|
3
|
-
"version": "5.3.
|
|
3
|
+
"version": "5.3.2",
|
|
4
4
|
"description": "A collection of simplified unstyled cross-platform UI components for Enact",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -32,8 +32,8 @@
|
|
|
32
32
|
}
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@enact/core": "^5.3.
|
|
36
|
-
"@enact/i18n": "^5.3.
|
|
35
|
+
"@enact/core": "^5.3.2",
|
|
36
|
+
"@enact/i18n": "^5.3.2",
|
|
37
37
|
"classnames": "^2.5.1",
|
|
38
38
|
"ilib": "^14.21.1",
|
|
39
39
|
"invariant": "^2.2.4",
|
package/useScroll/useScroll.js
CHANGED
|
@@ -97,6 +97,20 @@ var useForceUpdate = function useForceUpdate() {
|
|
|
97
97
|
return x + 1;
|
|
98
98
|
}, 0);
|
|
99
99
|
};
|
|
100
|
+
|
|
101
|
+
/*
|
|
102
|
+
* Rounds the target positions based on scroll direction, if Chrome version is > 120
|
|
103
|
+
* Chrome 121+ introduced a new way to calculate target pixel position, based on the subunit value of target position
|
|
104
|
+
*
|
|
105
|
+
* @function
|
|
106
|
+
* @param {Object} currentPosition current scroll position
|
|
107
|
+
* @param {Number} targetX target X axis position
|
|
108
|
+
* @param {Number} targetY target Y axis position
|
|
109
|
+
*
|
|
110
|
+
* @returns {Object}
|
|
111
|
+
* @memberof ui/useScroll
|
|
112
|
+
* @private
|
|
113
|
+
*/
|
|
100
114
|
function roundTarget(currentPosition, targetX, targetY) {
|
|
101
115
|
var roundedTargetX, roundedTargetY;
|
|
102
116
|
if (currentPosition !== null && currentPosition !== void 0 && currentPosition.scrollPos && _platform.platform.chrome > 120) {
|