Code Format

pull/5523/head
GitHub Actions Bot 2024-04-03 11:33:00 +00:00
parent 864f66a6a7
commit 9ae9dd82b4
1 changed files with 1 additions and 3 deletions

View File

@ -410,9 +410,7 @@ export default {
}, },
onTouchMove(e) { onTouchMove(e) {
const touchobj = e.changedTouches[0]; const touchobj = e.changedTouches[0];
const diff = this.isVertical() const diff = this.isVertical() ? touchobj.pageY - this.startPos.y : touchobj.pageX - this.startPos.x;
? touchobj.pageY - this.startPos.y
: touchobj.pageX - this.startPos.x;
if (Math.abs(diff) > this.swipeThreshold && e.cancelable) { if (Math.abs(diff) > this.swipeThreshold && e.cancelable) {
e.preventDefault(); e.preventDefault();