1 | 1 |
deleted file mode 100644 |
... | ... |
@@ -1,40 +0,0 @@ |
1 |
-// eslint-disable-next-line |
|
2 |
-import Swiper from '../../core'; |
|
3 |
-import { needsNavigation, needsPagination, needsScrollbar } from './utils'; |
|
4 |
- |
|
5 |
-function initSwiper(_ref, swiperParams) { |
|
6 |
- var el = _ref.el, |
|
7 |
- nextEl = _ref.nextEl, |
|
8 |
- prevEl = _ref.prevEl, |
|
9 |
- paginationEl = _ref.paginationEl, |
|
10 |
- scrollbarEl = _ref.scrollbarEl; |
|
11 |
- |
|
12 |
- if (needsNavigation(swiperParams) && nextEl && prevEl) { |
|
13 |
- if (swiperParams.navigation === true) { |
|
14 |
- swiperParams.navigation = {}; |
|
15 |
- } |
|
16 |
- |
|
17 |
- swiperParams.navigation.nextEl = nextEl; |
|
18 |
- swiperParams.navigation.prevEl = prevEl; |
|
19 |
- } |
|
20 |
- |
|
21 |
- if (needsPagination(swiperParams) && paginationEl) { |
|
22 |
- if (swiperParams.pagination === true) { |
|
23 |
- swiperParams.pagination = {}; |
|
24 |
- } |
|
25 |
- |
|
26 |
- swiperParams.pagination.el = paginationEl; |
|
27 |
- } |
|
28 |
- |
|
29 |
- if (needsScrollbar(swiperParams) && scrollbarEl) { |
|
30 |
- if (swiperParams.scrollbar === true) { |
|
31 |
- swiperParams.scrollbar = {}; |
|
32 |
- } |
|
33 |
- |
|
34 |
- swiperParams.scrollbar.el = scrollbarEl; |
|
35 |
- } |
|
36 |
- |
|
37 |
- return new Swiper(el, swiperParams); |
|
38 |
-} |
|
39 |
- |
|
40 |
-export { initSwiper }; |
|
41 | 0 |
\ No newline at end of file |
1 | 1 |
new file mode 100644 |
... | ... |
@@ -0,0 +1,40 @@ |
1 |
+// eslint-disable-next-line |
|
2 |
+import Swiper from '../../core'; |
|
3 |
+import { needsNavigation, needsPagination, needsScrollbar } from './utils'; |
|
4 |
+ |
|
5 |
+function initSwiper(_ref, swiperParams) { |
|
6 |
+ var el = _ref.el, |
|
7 |
+ nextEl = _ref.nextEl, |
|
8 |
+ prevEl = _ref.prevEl, |
|
9 |
+ paginationEl = _ref.paginationEl, |
|
10 |
+ scrollbarEl = _ref.scrollbarEl; |
|
11 |
+ |
|
12 |
+ if (needsNavigation(swiperParams) && nextEl && prevEl) { |
|
13 |
+ if (swiperParams.navigation === true) { |
|
14 |
+ swiperParams.navigation = {}; |
|
15 |
+ } |
|
16 |
+ |
|
17 |
+ swiperParams.navigation.nextEl = nextEl; |
|
18 |
+ swiperParams.navigation.prevEl = prevEl; |
|
19 |
+ } |
|
20 |
+ |
|
21 |
+ if (needsPagination(swiperParams) && paginationEl) { |
|
22 |
+ if (swiperParams.pagination === true) { |
|
23 |
+ swiperParams.pagination = {}; |
|
24 |
+ } |
|
25 |
+ |
|
26 |
+ swiperParams.pagination.el = paginationEl; |
|
27 |
+ } |
|
28 |
+ |
|
29 |
+ if (needsScrollbar(swiperParams) && scrollbarEl) { |
|
30 |
+ if (swiperParams.scrollbar === true) { |
|
31 |
+ swiperParams.scrollbar = {}; |
|
32 |
+ } |
|
33 |
+ |
|
34 |
+ swiperParams.scrollbar.el = scrollbarEl; |
|
35 |
+ } |
|
36 |
+ |
|
37 |
+ return new Swiper(el, swiperParams); |
|
38 |
+} |
|
39 |
+ |
|
40 |
+export { initSwiper }; |
|
0 | 41 |
\ No newline at end of file |