@megafon/ui-core 9.0.0-alpha.20 → 9.0.0-alpha.21
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.
|
@@ -100,12 +100,11 @@ var ModalMobile = function ModalMobile(_a) {
|
|
|
100
100
|
return;
|
|
101
101
|
}
|
|
102
102
|
window.cancelAnimationFrame(animationFrameId.current);
|
|
103
|
-
var
|
|
104
|
-
var isMoreHalfClosed = ((_a = e.changedTouches[0]) === null || _a === void 0 ? void 0 : _a.clientY) > containerCenterPosition;
|
|
103
|
+
var isMoreHalfClosed = ((_a = e.changedTouches[0]) === null || _a === void 0 ? void 0 : _a.clientY) - (initialTouchPosition || 0) > offsetHeightCenter;
|
|
105
104
|
setInitialTouchPosition(null);
|
|
106
105
|
onChangeContainerWrapTransform(isMoreHalfClosed ? 'translateY(100%)' : 'none');
|
|
107
106
|
onChangeTransitionStep(isMoreHalfClosed ? MODAL_TRANSITIONS_STEPS_ENUM.MOVE_END_STEP : MODAL_TRANSITIONS_STEPS_ENUM.INITIAL_STEP);
|
|
108
|
-
}, [containerWrapRef, scrollBarScrollableRef, isTransitionMoveStep, offsetHeightCenter, onChangeContainerWrapTransform, onChangeTransitionStep]);
|
|
107
|
+
}, [containerWrapRef, scrollBarScrollableRef, isTransitionMoveStep, initialTouchPosition, offsetHeightCenter, onChangeContainerWrapTransform, onChangeTransitionStep]);
|
|
109
108
|
React.useEffect(function () {
|
|
110
109
|
if (isSwipeDisabled) {
|
|
111
110
|
return undefined;
|
|
@@ -109,12 +109,11 @@ var ModalMobile = function ModalMobile(_a) {
|
|
|
109
109
|
return;
|
|
110
110
|
}
|
|
111
111
|
window.cancelAnimationFrame(animationFrameId.current);
|
|
112
|
-
var
|
|
113
|
-
var isMoreHalfClosed = ((_a = e.changedTouches[0]) === null || _a === void 0 ? void 0 : _a.clientY) > containerCenterPosition;
|
|
112
|
+
var isMoreHalfClosed = ((_a = e.changedTouches[0]) === null || _a === void 0 ? void 0 : _a.clientY) - (initialTouchPosition || 0) > offsetHeightCenter;
|
|
114
113
|
setInitialTouchPosition(null);
|
|
115
114
|
onChangeContainerWrapTransform(isMoreHalfClosed ? 'translateY(100%)' : 'none');
|
|
116
115
|
onChangeTransitionStep(isMoreHalfClosed ? _Modal.MODAL_TRANSITIONS_STEPS_ENUM.MOVE_END_STEP : _Modal.MODAL_TRANSITIONS_STEPS_ENUM.INITIAL_STEP);
|
|
117
|
-
}, [containerWrapRef, scrollBarScrollableRef, isTransitionMoveStep, offsetHeightCenter, onChangeContainerWrapTransform, onChangeTransitionStep]);
|
|
116
|
+
}, [containerWrapRef, scrollBarScrollableRef, isTransitionMoveStep, initialTouchPosition, offsetHeightCenter, onChangeContainerWrapTransform, onChangeTransitionStep]);
|
|
118
117
|
React.useEffect(function () {
|
|
119
118
|
if (isSwipeDisabled) {
|
|
120
119
|
return undefined;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@megafon/ui-core",
|
|
3
|
-
"version": "9.0.0-alpha.
|
|
3
|
+
"version": "9.0.0-alpha.21",
|
|
4
4
|
"files": [
|
|
5
5
|
"dist",
|
|
6
6
|
"styles"
|
|
@@ -50,7 +50,7 @@
|
|
|
50
50
|
"@babel/preset-env": "^7.8.6",
|
|
51
51
|
"@babel/preset-react": "^7.8.3",
|
|
52
52
|
"@babel/preset-typescript": "^7.8.3",
|
|
53
|
-
"@megafon/ui-icons": "^4.0.0-alpha.
|
|
53
|
+
"@megafon/ui-icons": "^4.0.0-alpha.12",
|
|
54
54
|
"@svgr/core": "^2.4.1",
|
|
55
55
|
"@testing-library/jest-dom": "^6.5.0",
|
|
56
56
|
"@testing-library/react": "^16.0.1",
|
|
@@ -104,5 +104,5 @@
|
|
|
104
104
|
"simplebar-react": "^3.2.5",
|
|
105
105
|
"swiper": "^12.1.2"
|
|
106
106
|
},
|
|
107
|
-
"gitHead": "
|
|
107
|
+
"gitHead": "7d9db674447f8aa7ac10690806d154e53d899ebe"
|
|
108
108
|
}
|