Small tweak

This commit is contained in:
Brahim Hadriche committed 2023-07-03 11:30:53 -04:00
1 parent 60e8b9200e
commit 093953c113
1 file changed
+1 -1
+1 -1
View File
@@ -49,7 +49,7 @@
function recalculateVisibileCells() {
const scrollLeft = carouselElement.scrollLeft;
const clientWidth = carouselElement.clientWidth;
const clientWidth = carouselElement.clientWidth || window.innerWidth;
scrollStart = Math.floor(scrollLeft / itemWidth) - 1;
scrollEnd = Math.ceil((scrollLeft + clientWidth) / itemWidth) + 1;