indicator-ui 0.0.324 → 0.0.326
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -42573,7 +42573,7 @@ function useSmartScroll() {
|
|
|
42573
42573
|
target.removeEventListener('scroll', scrollListener);
|
|
42574
42574
|
}
|
|
42575
42575
|
};
|
|
42576
|
-
}, [options]);
|
|
42576
|
+
}, [options, callbacks]);
|
|
42577
42577
|
var getScrollSign = function getScrollSign() {
|
|
42578
42578
|
var target = ref.current;
|
|
42579
42579
|
if (target === null) {
|
|
@@ -42601,14 +42601,17 @@ function useSmartScroll() {
|
|
|
42601
42601
|
setIsScrollable(scrollHeight > clientHeight);
|
|
42602
42602
|
}
|
|
42603
42603
|
};
|
|
42604
|
-
var getScrollState = function getScrollState(scrollTop, scrollHeight) {
|
|
42604
|
+
var getScrollState = function getScrollState(scrollTop, scrollHeight, clientHeight) {
|
|
42605
42605
|
var topAbs = Math.abs(scrollTop);
|
|
42606
|
+
if (scrollHeight === clientHeight) {
|
|
42607
|
+
return 'not-scrollable';
|
|
42608
|
+
}
|
|
42606
42609
|
if (topAbs === 0) {
|
|
42607
|
-
return 'start';
|
|
42608
|
-
} else if (topAbs === scrollHeight) {
|
|
42609
|
-
return 'end';
|
|
42610
|
+
return 'in-start';
|
|
42611
|
+
} else if (topAbs + clientHeight === scrollHeight) {
|
|
42612
|
+
return 'in-end';
|
|
42610
42613
|
}
|
|
42611
|
-
return 'middle';
|
|
42614
|
+
return 'in-middle';
|
|
42612
42615
|
};
|
|
42613
42616
|
var getParts = function getParts(scrollTop, scrollHeight, clientHeight) {
|
|
42614
42617
|
var scrollTopAbs = Math.abs(scrollTop);
|
|
@@ -42632,7 +42635,7 @@ function useSmartScroll() {
|
|
|
42632
42635
|
scrollTop: scrollTop,
|
|
42633
42636
|
scrollHeight: scrollHeight,
|
|
42634
42637
|
clientHeight: clientHeight,
|
|
42635
|
-
state: getScrollState(scrollTop, scrollHeight),
|
|
42638
|
+
state: getScrollState(scrollTop, scrollHeight, clientHeight),
|
|
42636
42639
|
parts: getParts(scrollTop, scrollHeight, clientHeight)
|
|
42637
42640
|
});
|
|
42638
42641
|
}
|