Mini Shell
Direktori : /home/funerariamayer/www/app/ |
|
Current File : /home/funerariamayer/www/app/node_modules_ionic_core_dist_esm_swipe-back-edc455e2_js.js |
"use strict";
(self["webpackChunkapp"] = self["webpackChunkapp"] || []).push([["node_modules_ionic_core_dist_esm_swipe-back-edc455e2_js"],{
/***/ 50926:
/*!******************************************************************!*\
!*** ./node_modules/@ionic/core/dist/esm/swipe-back-edc455e2.js ***!
\******************************************************************/
/***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
__webpack_require__.r(__webpack_exports__);
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
/* harmony export */ "createSwipeBackGesture": () => (/* binding */ createSwipeBackGesture)
/* harmony export */ });
/* harmony import */ var _helpers_eed79a2b_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./helpers-eed79a2b.js */ 17998);
/* harmony import */ var _index_41bf41f2_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./index-41bf41f2.js */ 61483);
/* harmony import */ var _gesture_controller_68c023a4_js__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! ./gesture-controller-68c023a4.js */ 29381);
/*!
* (C) Ionic http://ionicframework.com - MIT License
*/
const createSwipeBackGesture = (el, canStartHandler, onStartHandler, onMoveHandler, onEndHandler) => {
const win = el.ownerDocument.defaultView;
const canStart = (detail) => {
return detail.startX <= 50 && canStartHandler();
};
const onMove = (detail) => {
// set the transition animation's progress
const delta = detail.deltaX;
const stepValue = delta / win.innerWidth;
onMoveHandler(stepValue);
};
const onEnd = (detail) => {
// the swipe back gesture has ended
const delta = detail.deltaX;
const width = win.innerWidth;
const stepValue = delta / width;
const velocity = detail.velocityX;
const z = width / 2.0;
const shouldComplete = velocity >= 0 && (velocity > 0.2 || detail.deltaX > z);
const missing = shouldComplete ? 1 - stepValue : stepValue;
const missingDistance = missing * width;
let realDur = 0;
if (missingDistance > 5) {
const dur = missingDistance / Math.abs(velocity);
realDur = Math.min(dur, 540);
}
/**
* TODO: stepValue can sometimes return negative values
* or values greater than 1 which should not be possible.
* Need to investigate more to find where the issue is.
*/
onEndHandler(shouldComplete, (stepValue <= 0) ? 0.01 : (0,_helpers_eed79a2b_js__WEBPACK_IMPORTED_MODULE_0__.d)(0, stepValue, 0.9999), realDur);
};
return (0,_index_41bf41f2_js__WEBPACK_IMPORTED_MODULE_1__.createGesture)({
el,
gestureName: 'goback-swipe',
gesturePriority: 40,
threshold: 10,
canStart,
onStart: onStartHandler,
onMove,
onEnd
});
};
/***/ })
}]);
//# sourceMappingURL=node_modules_ionic_core_dist_esm_swipe-back-edc455e2_js.js.map
Zerion Mini Shell 1.0