oolib 2.39.1 → 2.40.0
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.
|
@@ -27,6 +27,7 @@ var useScrollBar = function () {
|
|
|
27
27
|
var slide = function (direction) {
|
|
28
28
|
var _a = scrollContainerRef.current, scrollWidth = _a.scrollWidth, offsetWidth = _a.offsetWidth, scrollLeft = _a.scrollLeft;
|
|
29
29
|
var containerWidth = scrollContainerRef.current.parentNode.getBoundingClientRect().width;
|
|
30
|
+
console.log({ containerWidth: containerWidth });
|
|
30
31
|
if (direction === "left") {
|
|
31
32
|
var newScrollLeft = Math.max(scrollLeft - containerWidth, 0); // // ensures that the content is always visible within the scrollable element and no part of it is hidden.
|
|
32
33
|
if (scrollLeft === newScrollLeft) {
|
|
@@ -42,6 +43,7 @@ var useScrollBar = function () {
|
|
|
42
43
|
if (scrollLeft === newScrollLeft) {
|
|
43
44
|
setScrollIsAtEnd(true);
|
|
44
45
|
}
|
|
46
|
+
console.log({ newScrollLeft: newScrollLeft, scrollContainerRef: scrollContainerRef });
|
|
45
47
|
scrollContainerRef.current.scrollTo({
|
|
46
48
|
left: newScrollLeft,
|
|
47
49
|
behavior: "smooth"
|