Small tweak
This commit is contained in:
1 parent
60e8b9200e
commit
093953c113
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user