aiber-test/www/swipe-back-2154c9a7-js-es2015.js.map
2020-12-18 09:30:04 +00:00

1 line
2.2 KiB
Plaintext

{"version":3,"sources":["./node_modules/@ionic/core/dist/esm/swipe-back-2154c9a7.js"],"names":[],"mappings":";;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAmD;AACT;AACU;;AAEpD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,2DAA2D,8DAAK;AAChE;AACA,SAAS,wEAAa;AACtB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;;AAEkC","file":"swipe-back-2154c9a7-js-es2015.js","sourcesContent":["import { h as clamp } from './helpers-90f46169.js';\nimport './gesture-controller-31cb6bb9.js';\nimport { createGesture } from './index-f49d994d.js';\n\nconst createSwipeBackGesture = (el, canStartHandler, onStartHandler, onMoveHandler, onEndHandler) => {\n const win = el.ownerDocument.defaultView;\n const canStart = (detail) => {\n return detail.startX <= 50 && canStartHandler();\n };\n const onMove = (detail) => {\n // set the transition animation's progress\n const delta = detail.deltaX;\n const stepValue = delta / win.innerWidth;\n onMoveHandler(stepValue);\n };\n const onEnd = (detail) => {\n // the swipe back gesture has ended\n const delta = detail.deltaX;\n const width = win.innerWidth;\n const stepValue = delta / width;\n const velocity = detail.velocityX;\n const z = width / 2.0;\n const shouldComplete = velocity >= 0 && (velocity > 0.2 || detail.deltaX > z);\n const missing = shouldComplete ? 1 - stepValue : stepValue;\n const missingDistance = missing * width;\n let realDur = 0;\n if (missingDistance > 5) {\n const dur = missingDistance / Math.abs(velocity);\n realDur = Math.min(dur, 540);\n }\n /**\n * TODO: stepValue can sometimes return negative values\n * or values greater than 1 which should not be possible.\n * Need to investigate more to find where the issue is.\n */\n onEndHandler(shouldComplete, (stepValue <= 0) ? 0.01 : clamp(0, stepValue, 0.9999), realDur);\n };\n return createGesture({\n el,\n gestureName: 'goback-swipe',\n gesturePriority: 40,\n threshold: 10,\n canStart,\n onStart: onStartHandler,\n onMove,\n onEnd\n });\n};\n\nexport { createSwipeBackGesture };\n"],"sourceRoot":"webpack:///"}