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

Commit 7f7ccd5

Browse files
committed
build
1 parent 7d82fe3 commit 7f7ccd5

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

build/asscroll.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2791,6 +2791,7 @@ class Controller {
27912791
this.horizontalScroll = false;
27922792
this.firstResize = true;
27932793
this.preventResizeScroll = false;
2794+
this.nativeScroll = true;
27942795
this.ease = (store_default()).isTouch ? this.options.touchEase : this.options.ease;
27952796
this.originalScrollbarSetting = this.options.customScrollbar;
27962797
this.testFps = true;
@@ -2837,6 +2838,7 @@ class Controller {
28372838
}
28382839

28392840
setupSmoothScroll() {
2841+
this.nativeScroll = false;
28402842
Object.assign(this.containerElement.style, {
28412843
position: 'fixed',
28422844
top: '0px',
@@ -3264,6 +3266,15 @@ class ASScroll {
32643266
get isHorizontal() {
32653267
return this.controller.horizontalScroll;
32663268
}
3269+
/**
3270+
* Returns whether or not ASScroll is actively transforming the page element(s). For example, would return false if running on a touch device and touchScrollType !== 'transform', or if ASScroll was currently disabled via the .disable() method.
3271+
* @return {boolean} The status of actively controlling the page scroll
3272+
*/
3273+
3274+
3275+
get isScrollJacking() {
3276+
return !this.controller.nativeScroll && this.controller.enabled;
3277+
}
32673278
/**
32683279
* @deprecated since 2.0.0 - use targetPos instead
32693280
* @see {@link ASScroll#targetPos}

0 commit comments

Comments
 (0)