fix: Fix thumbnail carousel scroll position (#1606)
* fix: Fix thumbnail carousel scroll position * Small formatting fix
This commit is contained in:
1 parent
1f5d4bd8b0
commit
21b468734c
7 files changed
+26
-20
No files matched your search
@@ -207,7 +207,7 @@ describe('CarouselController', () => {
|
||||
loop: true,
|
||||
containScroll: 'trimSnaps',
|
||||
watchSlides: false,
|
||||
watchResize: false,
|
||||
watchResize: true,
|
||||
watchDrag: false,
|
||||
},
|
||||
plugins,
|
||||
|
||||
@@ -59,10 +59,17 @@ describe('AutoSize', () => {
|
||||
// First intersection handler call sets the state only.
|
||||
callIntersectionHandler(true);
|
||||
|
||||
// When not visible, will not re-init.
|
||||
callIntersectionHandler(false);
|
||||
callIntersectionHandler(false);
|
||||
callIntersectionHandler(false);
|
||||
|
||||
expect(emblaApi.reInit).not.toBeCalled();
|
||||
|
||||
// When visible, will re-initialize once.
|
||||
callIntersectionHandler(true);
|
||||
callIntersectionHandler(true);
|
||||
|
||||
expect(emblaApi.reInit).toBeCalledTimes(1);
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user