Skip to content
This repository was archived by the owner on Aug 9, 2023. It is now read-only.

Commit 8081022

Browse files
committed
build
1 parent c8f6731 commit 8081022

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

build/asscroll.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2498,7 +2498,12 @@ var Scroll_Scroll = /*#__PURE__*/function () {
24982498
this.wheel = true;
24992499
return;
25002500
} else {
2501-
this.scrollPos = this.touchScroll ? -this.scrollContainer.scrollTop : -window.scrollY;
2501+
if (this.touchScroll) {
2502+
this.scrollPos = this.horizontalScroll ? -this.scrollContainer.scrollLeft : -this.scrollContainer.scrollTop;
2503+
} else {
2504+
this.scrollPos = -window.scrollY;
2505+
}
2506+
25022507
this.wheel = false;
25032508

25042509
if (Store_default.a.isTouch && this.options.disableOnTouch) {
@@ -2630,7 +2635,11 @@ var Scroll_Scroll = /*#__PURE__*/function () {
26302635
this.scrollPos = y;
26312636

26322637
if (Store_default.a.isTouch && this.options.disableOnTouch) {
2633-
this.scrollContainer.scrollTo(0, -this.scrollPos);
2638+
if (this.horizontalScroll) {
2639+
this.scrollContainer.scrollTo(-this.scrollPos, 0);
2640+
} else {
2641+
this.scrollContainer.scrollTo(0, -this.scrollPos);
2642+
}
26342643
}
26352644

26362645
this.clamp();

0 commit comments

Comments
 (0)