well-waterfall 0.0.6 → 0.0.8

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.
package/README.md CHANGED
@@ -1,47 +1,192 @@
1
- # 🥞 Waterfall by Wellflow
1
+ [![npm version](https://badge.fury.io/js/angular2-expandable-list.svg)](https://badge.fury.io/js/angular2-expandable-list) [![code style: prettier](https://img.shields.io/badge/code_style-prettier-ff69b4.svg?style=flat-square)](https://github.com/prettier/prettier)
2
2
 
3
- Waterfall is an attributes-based slider library for quickly creating fully customizable sliders without using Javascript! This library is a wrapper for SwiperJS, which is an excellent open-source package.
3
+ # 💧Waterfall by Wellflow 💧
4
4
 
5
- ## Setup
5
+ Waterfall is a single-line of code for Webflow that enables developers to use attributes to quickly build sliders based on SwiperJS. This library is a basically an attribute wrapper for SwiperJS 10.9.0.
6
6
 
7
- Create an element with class .waterfall
7
+ While other slider options are paid, Waterfall will always be a free solution (until Webflow implements a better native slider option).
8
8
 
9
+ ## Table of contents
10
+
11
+ - [Project Name](#project-name)
12
+ - [Prerequisites](#prerequisites)
13
+ - [Table of contents](#table-of-contents)
14
+ - [Getting Started](#getting-started)
15
+ - [Installation](#installation)
16
+ - [Usage](#usage)
17
+ - [Serving the app](#serving-the-app)
18
+ - [Running the tests](#running-the-tests)
19
+ - [Building a distribution version](#building-a-distribution-version)
20
+ - [Serving the distribution version](#serving-the-distribution-version)
21
+ - [API](#api)
22
+ - [useBasicFetch](#usebasicfetch)
23
+ - [Options](#options)
24
+ - [fetchData](#fetchdata)
25
+ - [Contributing](#contributing)
26
+ - [Credits](#credits)
27
+ - [Built With](#built-with)
28
+ - [Versioning](#versioning)
29
+ - [Authors](#authors)
30
+ - [License](#license)
31
+
32
+ ## Getting Started
33
+
34
+ These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
35
+
36
+ ## Installation
37
+
38
+ Add the code to the Footer Code (after the `</body>` tag) in the Webflow Project Settings.
39
+
40
+ **Latest Version**
41
+
42
+ ```
43
+ <script src="https://cdn.jsdelivr.net/npm/well-waterfall@0.0.5/dist/waterfall.js?"></script>
44
+ ```
45
+
46
+ **Specific (Stable) Version**
47
+
48
+ ```
49
+ <script src="https://cdn.jsdelivr.net/npm/well-waterfall@0.0.5/dist/waterfall.js?"></script>
50
+ ```
51
+
52
+ ## Usage
53
+
54
+ ### Add the Waterfall Layout
55
+
56
+ If you're familiar with SwiperJS, you'll notice that this is the same layout found in the documentation with one added div wrapper with the attribute `[waterfall="SWIPER_NAME"]` where `SWIPER_NAME` is a unique identifying string for that swiper.
57
+
58
+ ```
9
59
  <!-- Slider main container -->
10
- <div class="waterfall">
11
- <!-- Additional required wrapper -->
12
- <div class="swiper-wrapper">
13
- <!-- Slides -->
14
- <div class="swiper-slide">Slide 1</div>
15
- <div class="swiper-slide">Slide 2</div>
16
- <div class="swiper-slide">Slide 3</div>
17
- ...
18
- </div>
60
+ <div waterfall="SWIPER_NAME">
61
+ <div class="swiper">
62
+ <!-- Additional required wrapper -->
63
+ <div class="swiper-wrapper">
64
+ <!-- Slides -->
65
+ <div class="swiper-slide">Slide 1</div>
66
+ <div class="swiper-slide">Slide 2</div>
67
+ <div class="swiper-slide">Slide 3</div>
68
+ ...
69
+ </div>
70
+ </div>
19
71
  </div>
72
+ ```
20
73
 
21
- All slider settings will be added as attributes to the element with the .waterfall class.
74
+ All slider settings will be added as attributes to the element with the [waterfall] attribute. For example, to add navigation, `[navigationMode="true"]` will be added to the attributes of the .swiper element above.
22
75
 
23
76
  ## General Settings
24
77
 
78
+ | attributeName | description | type | default |
79
+ | ------------- | ---------------------------------------------------------------------------- | ------- | ------- |
80
+ | debugMode | when `true`, prints out debug statements to the console to help find errors. | boolean | false |
81
+
25
82
  ## Navigation
26
83
 
27
- Navigation allows for buttons to control moving to previous or next slides. To enable navigation, add the attribute [navigationMode="true"].
84
+ Navigation allows for buttons to control moving to previous or next slides. To enable navigation, add the attribute `[navigationMode="true"]`.
85
+ Add `[waterfall-el='next']` to an element used to advance to the next slide and `[waterfall-el='prev']` to an element used to rewind to the previous slide.
28
86
 
29
87
  **Navigation Settings**
88
+
30
89
  NYI (Not Yet Implemented)
31
90
 
32
91
  ## Autoplay
33
92
 
34
- Autoplay advances the slider automatically. To enable autoplay, add the attribute [autoplayMode="true"].
93
+ Autoplay advances the slider automatically. To enable autoplay, add the attribute `[autoplayMode="true"]`.
94
+
95
+ **Autoplay Settings (COMPLETE)**
96
+ |attributeName|description|type|default
97
+ |--|--|--|--|
98
+ |delay|Delay between transitions (in ms). If this parameter is not specified, auto play will be disabled|number|0|
99
+ |disableOnInteraction|Set to `false` and autoplay will not be disabled after user interactions (swipes), it will be restarted every time after interaction|number|0|
100
+ |pauseOnMouseEnter|When enabled autoplay will be paused on pointer (mouse) enter over Swiper container|boolean|false
101
+ |reverseDirection|Enables autoplay in reverse direction|boolean|false
102
+ |stopOnLastSlide|Enable this parameter and autoplay will be stopped when it reaches last slide (has no effect in loop mode)|boolean|false|
103
+ |waitForTransition|NOT IMPLEMENTED|-|-|
104
+
105
+ ## Pagination
106
+
107
+ Pagination are a list of markers (dots, squares, numbers) that display the current slide. To enable pagination, add the attribute [paginationMode="true"] to the global settings.
108
+
109
+ Next, add `[waterfall-el="pagination"]` to the wrapper containing the pagination.
110
+
111
+ Then, add `[waterfall-el="pagination-bullet"]` to the element used as the bullet for the pagination. Also add `[waterfall-pagination-active-class=ACTIVE_CLASS_NAME]` so that the active bullet gets the correct class.
112
+
113
+ **Pagination Settings (IN PROGRESS)**
114
+
115
+ | attributeName | description | type | default |
116
+ | ----------------- | ------------------------------------------------------------------------- | ------ | --------------------------------- |
117
+ | bulletActiveClass | CSS class name of currently active pagination bullet | string | 'swiper-pagination-bullet-active' |
118
+ | el | String with CSS selector or HTML element of the container with pagination | any | null |
119
+
120
+ clickable: parseBool(getAttrOrDefault($this, "paginationClickable", true)),
121
+
122
+ type: "bullets",
123
+
124
+ dynamicBullets: false,
125
+
126
+ ## Scrollbar (In Progress)
127
+
128
+ To add a scrollbar, first set `[scrollbar-mode='true']`.
129
+
130
+ Add `[waterfall-el='scrollbar']` to the scrollbar element (the full scrollbar) and add `[waterfall-el='scrollbar-drag']` to the draggable area of the scrollbar.
131
+
132
+ **Scrollbar Settings (IN PROGRESS)**
133
+
134
+ | attributeName | description | type | default |
135
+ | ------------- | ------------------------------------- | ---- | ----------------------- |
136
+ | dragClass | Scrollbar draggable element CSS class | el | 'swiper-scrollbar-drag' |
137
+
138
+ dragSize: "auto",
139
+
140
+ draggable: false,
141
+
142
+ el: "." + scrollbarEl.attr("class"),
143
+
144
+ enabled: true,
145
+
146
+ hide: false,
147
+
148
+ horizontalClass: "swiper-scrollbar-horizontal",
149
+
150
+ lockClass: "swiper-scrollbar-lock",
151
+
152
+ scrollbarDisabledClass: "swiper-scrollbar-disabled",
153
+
154
+ snapOnRelease: false,
155
+
156
+ verticalClass: "swiper-scrollbar-vertical",
157
+
158
+ ## Contributing
159
+
160
+ Please read [CONTRIBUTING.md](CONTRIBUTING.md) for details on our code of conduct, and the process for submitting pull requests to us.
161
+
162
+ 1. Fork it!
163
+ 2. Create your feature branch: `git checkout -b my-new-feature`
164
+ 3. Add your changes: `git add .`
165
+ 4. Commit your changes: `git commit -am 'Add some feature'`
166
+ 5. Push to the branch: `git push origin my-new-feature`
167
+ 6. Submit a pull request :sunglasses:
168
+
169
+ ## Credits
170
+
171
+ TODO: Write credits
172
+
173
+ ## Built With
174
+
175
+ - Dropwizard - Bla bla bla
176
+ - Maven - Maybe
177
+ - Atom - ergaerga
178
+ - Love
179
+
180
+ ## Versioning
181
+
182
+ We use [SemVer](http://semver.org/) for versioning. For the versions available, see the [tags on this repository](https://github.com/your/project/tags).
183
+
184
+ ## Authors
185
+
186
+ - **John Doe** - _Initial work_ - [JohnDoe](https://github.com/JohnDoe)
35
187
 
36
- **Autoplay Settings**
37
- delay: parseInt(getAttrOrDefault($this, "delay", 0), 10),
38
- disableOnInteraction: parseBool(getAttrOrDefault($this, "disableOnInteraction", false)),
39
- reverseDirection: parseBool(getAttrOrDefault($this, "reverseDirection", false)),
40
- pauseOnMouseEnter: parseBool(getAttrOrDefault($this, "pauseOnMouseEnter", false)),
41
- stopOnLastSlide: parseBool(getAttrOrDefault($this, "stopOnLastSlide", false)),
188
+ See also the list of [contributors](https://github.com/your/project/contributors) who participated in this project.
42
189
 
43
- **Webflow Designer Placeholder**
44
- To have the video display for a preview in the Webflow Designer, you can duplicate the element and change the tag to 'video'. Give the element the attribute [syrup-el='scroll-video-placeholder']
190
+ ## License
45
191
 
46
- **Video Hosting Tips**
47
- I host my videos on AWS S3 / CloudFront. It's really easy to set up, cheaper than Vimeo, has no ads, and loads quickly.
192
+ [MIT License](https://andreasonny.mit-license.org/2019) © Andrea SonnY
package/dist/waterfall.js CHANGED
@@ -136,7 +136,7 @@ eval("\n\n/* istanbul ignore next */\nfunction styleTagTransform(css, styleElem
136
136
  \**************************/
137
137
  /***/ ((__unused_webpack_module, __webpack_exports__, __webpack_require__) => {
138
138
 
139
- eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var swiper_bundle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper/bundle */ \"./node_modules/swiper/swiper-bundle.mjs\");\n/* harmony import */ var swiper_css_bundle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! swiper/css/bundle */ \"./node_modules/swiper/swiper-bundle.css\");\nconsole.log(\"🚿 Hello from Wellflow Waterfall\");\n\n\n\n\nconst sliders = [];\n\nfunction parseBool(attr) {\n return attr === \"true\";\n}\n\nfunction getAttrOrDefault(el, attrName, defaultValue) {\n return $(el).attr(attrName) || defaultValue;\n}\n\n$(\"[waterfall]\").each(function (index) {\n const $this = $(this);\n const name = getAttrOrDefault($this, \"waterfall\", `Swiper ${index}`);\n const debug = getAttrOrDefault($this, \"debugMode\", false);\n\n function printDebug(str, el) {\n if (!debug) return;\n console.log(str, \": \", el);\n }\n\n const swiperConfig = {\n slidesPerView: getAttrOrDefault($this, \"portraitSlides\", \"auto\"),\n centeredSlides: parseBool(getAttrOrDefault($this, \"portraitCenteredSlides\", false)),\n direction: getAttrOrDefault($this, \"direction\", \"horizontal\"),\n loop: parseBool(getAttrOrDefault($this, \"loopMode\", false)),\n effect: getAttrOrDefault($this, \"effect\", \"slide\"),\n speed: parseInt(getAttrOrDefault($this, \"speed\", 700), 10),\n spaceBetween: parseInt(getAttrOrDefault($this, \"spaceBetween\", 0), 10),\n allowTouchMove: parseBool(getAttrOrDefault($this, \"allowTouchMove\", false)),\n breakpoints: {\n 478: {\n slidesPerView: getAttrOrDefault($this, \"landscapeSlides\", \"auto\"),\n centeredSlides: parseBool(getAttrOrDefault($this, \"landscapeCenteredSlides\", false)),\n },\n 767: {\n slidesPerView: getAttrOrDefault($this, \"tabletSlides\", \"auto\"),\n centeredSlides: parseBool(getAttrOrDefault($this, \"tabletCenteredSlides\", false)),\n },\n 991: {\n slidesPerView: getAttrOrDefault($this, \"slides\", \"auto\"),\n centeredSlides: parseBool(getAttrOrDefault($this, \"centeredSlides\", false)),\n },\n }\n };\n\n // Autoplay configuration\n if (parseBool(getAttrOrDefault($this, \"autoplayMode\", false))) {\n swiperConfig.autoplay = {\n delay: parseInt(getAttrOrDefault($this, \"delay\", 0), 10),\n disableOnInteraction: parseBool(getAttrOrDefault($this, \"disableOnInteraction\", false)),\n reverseDirection: parseBool(getAttrOrDefault($this, \"reverseDirection\", false)),\n pauseOnMouseEnter: parseBool(getAttrOrDefault($this, \"pauseOnMouseEnter\", false)),\n stopOnLastSlide: parseBool(getAttrOrDefault($this, \"stopOnLastSlide\", false)),\n };\n }\n\n // Pagination configuration\n const paginationEl = $this.find(\"[waterfall-el='pagination']\")[0];\n printDebug(\"PAGINATION\", paginationEl);\n if (paginationEl && parseBool(getAttrOrDefault($this, \"paginationMode\", false))) {\n swiperConfig.pagination = {\n el: paginationEl,\n clickable: parseBool(getAttrOrDefault($this, \"paginationClickable\", true)),\n bulletClass: $this.find(\"[waterfall-el='pagination-bullet']\").attr(\"class\"),\n bulletActiveClass: $this.find(\"[waterfall-pagination-active-class]\").attr(\"waterfall-pagination-active-class\"),\n type: \"bullets\",\n dynamicBullets: false,\n };\n }\n\n // Navigation configuration\n const navigationMode = parseBool(getAttrOrDefault($this, \"navigationMode\", false));\n printDebug('NAVIGATION', navigationMode);\n if (navigationMode) {\n swiperConfig.navigation = {\n nextEl: $this.find(\"[waterfall-el='next']\")[0],\n prevEl: $this.find(\"[waterfall-el='prev']\")[0],\n };\n printDebug(\"NEXT BUTTON\", swiperConfig.navigation.nextEl);\n printDebug(\"PREV BUTTON\", swiperConfig.navigation.prevEl);\n }\n\n // Scrollbar configuration\n const scrollbarEl = $this.find(\"[waterfall-el='scrollbar']\");\n const scrollbarDrag = $(scrollbarEl).find(\"[waterfall-el='scrollbar-drag']\");\n printDebug(\"SCROLLBAR\", scrollbarEl);\n printDebug(\"SCROLLBAR DRAG\", scrollbarEl);\n if (scrollbarEl && parseBool(getAttrOrDefault($this, \"scrollbarMode\", false))) {\n swiperConfig.scrollbar = {\n dragClass: scrollbarDrag.attr(\"class\"),\n dragSize: \"auto\",\n draggable: false,\n el: \".\" + scrollbarEl.attr(\"class\"),\n enabled: true,\n hide: false,\n horizontalClass: \"swiper-scrollbar-horizontal\",\n lockClass: \"swiper-scrollbar-lock\",\n scrollbarDisabledClass: \"swiper-scrollbar-disabled\",\n snapOnRelease: false,\n verticalClass: \"swiper-scrollbar-vertical\",\n };\n }\n\n // Initialize swiper\n const swiper = new swiper_bundle__WEBPACK_IMPORTED_MODULE_0__[\"default\"]($this.find(\".swiper\")[0], swiperConfig);\n\n sliders.push({ name, slider: swiper });\n});\n\n//# sourceURL=webpack://Waterfall/./src/waterfall.js?");
139
+ eval("__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var swiper_bundle__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! swiper/bundle */ \"./node_modules/swiper/swiper-bundle.mjs\");\n/* harmony import */ var swiper_css_bundle__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! swiper/css/bundle */ \"./node_modules/swiper/swiper-bundle.css\");\nconsole.log(\"🚿 Hello from Wellflow Waterfall\");\n\n\n\n\nconst sliders = [];\n\nfunction parseBool(attr) {\n return attr === \"true\";\n}\n\nfunction getAttrOrDefault(el, attrName, defaultValue) {\n return $(el).attr(attrName) || defaultValue;\n}\n\n$(\"[waterfall]\").each(function (index) {\n const $this = $(this);\n const name = getAttrOrDefault($this, \"waterfall\", `Swiper ${index}`);\n const debug = getAttrOrDefault($this, \"debugMode\", false);\n\n function printDebug(str, el) {\n if (!debug) return;\n console.log(str, \": \", el);\n }\n\n const swiperConfig = {\n slidesPerView: getAttrOrDefault($this, \"portraitSlides\", \"auto\"),\n centeredSlides: parseBool(getAttrOrDefault($this, \"portraitCenteredSlides\", false)),\n direction: getAttrOrDefault($this, \"direction\", \"horizontal\"),\n loop: parseBool(getAttrOrDefault($this, \"loopMode\", false)),\n effect: getAttrOrDefault($this, \"effect\", \"slide\"),\n speed: parseInt(getAttrOrDefault($this, \"speed\", 700), 10),\n spaceBetween: parseInt(getAttrOrDefault($this, \"spaceBetween\", 0), 10),\n allowTouchMove: parseBool(getAttrOrDefault($this, \"allowTouchMove\", false)),\n breakpoints: {\n 478: {\n slidesPerView: getAttrOrDefault($this, \"landscapeSlides\", \"auto\"),\n centeredSlides: parseBool(getAttrOrDefault($this, \"landscapeCenteredSlides\", false)),\n },\n 767: {\n slidesPerView: getAttrOrDefault($this, \"tabletSlides\", \"auto\"),\n centeredSlides: parseBool(getAttrOrDefault($this, \"tabletCenteredSlides\", false)),\n },\n 991: {\n slidesPerView: getAttrOrDefault($this, \"slides\", \"auto\"),\n centeredSlides: parseBool(getAttrOrDefault($this, \"centeredSlides\", false)),\n },\n }\n };\n\n //------- Modules --------------------------------\n\n // AUTOPLAY\n const autoplayMode = parseBool(getAttrOrDefault($this, \"autoplayMode\", false));\n printDebug(\"AUTOPLAY MODE\", autoplayMode);\n\n if (autoplayMode) {\n swiperConfig.autoplay = {\n delay: parseInt(getAttrOrDefault($this, \"delay\", 0), 10),\n disableOnInteraction: parseBool(getAttrOrDefault($this, \"disableOnInteraction\", false)),\n reverseDirection: parseBool(getAttrOrDefault($this, \"reverseDirection\", false)),\n pauseOnMouseEnter: parseBool(getAttrOrDefault($this, \"pauseOnMouseEnter\", false)),\n stopOnLastSlide: parseBool(getAttrOrDefault($this, \"stopOnLastSlide\", false)),\n };\n }\n\n // PAGINATION\n const paginationMode = parseBool(getAttrOrDefault($this, \"paginationMode\", false));\n printDebug(\"PAGINATION MODE\", paginationMode);\n const paginationEl = $this.find(\"[waterfall-el='pagination']\")[0];\n printDebug(\"PAGINATION\", paginationEl);\n\n if (paginationMode) {\n swiperConfig.pagination = {\n el: paginationEl,\n clickable: parseBool(getAttrOrDefault($this, \"paginationClickable\", true)),\n bulletClass: $this.find(\"[waterfall-el='pagination-bullet']\").attr(\"class\"),\n bulletActiveClass: $this.find(\"[waterfall-pagination-active-class]\").attr(\"waterfall-pagination-active-class\"),\n type: \"bullets\",\n dynamicBullets: false,\n };\n }\n\n // NAVIGATION\n const navigationMode = parseBool(getAttrOrDefault($this, \"navigationMode\", false));\n printDebug('NAVIGATION', navigationMode);\n\n if (navigationMode) {\n swiperConfig.navigation = {\n nextEl: $this.find(\"[waterfall-el='next']\")[0],\n prevEl: $this.find(\"[waterfall-el='prev']\")[0],\n };\n printDebug(\"NEXT BUTTON\", swiperConfig.navigation.nextEl);\n printDebug(\"PREV BUTTON\", swiperConfig.navigation.prevEl);\n }\n\n // SCROLLBAR\n const scrollbarMode = parseBool(getAttrOrDefault($this, \"scrollbarMode\", false));\n printDebug(\"SCROLLBAR MODE\", scrollbarMode);\n const scrollbarEl = $this.find(\"[waterfall-el='scrollbar']\");\n printDebug(\"SCROLLBAR\", scrollbarEl);\n const scrollbarDrag = $(scrollbarEl).find(\"[waterfall-el='scrollbar-drag']\");\n printDebug(\"SCROLLBAR DRAG\", scrollbarDrag);\n\n if (scrollbarMode) {\n swiperConfig.scrollbar = {\n dragClass: scrollbarDrag.attr(\"class\"),\n dragSize: \"auto\",\n draggable: false,\n el: \".\" + scrollbarEl.attr(\"class\"),\n enabled: true,\n hide: false,\n horizontalClass: \"swiper-scrollbar-horizontal\",\n lockClass: \"swiper-scrollbar-lock\",\n scrollbarDisabledClass: \"swiper-scrollbar-disabled\",\n snapOnRelease: false,\n verticalClass: \"swiper-scrollbar-vertical\",\n };\n }\n\n // Initialize swiper\n const swiper = new swiper_bundle__WEBPACK_IMPORTED_MODULE_0__[\"default\"]($this.find(\".swiper\")[0], swiperConfig);\n\n sliders.push({ name, slider: swiper });\n});\n\n//# sourceURL=webpack://Waterfall/./src/waterfall.js?");
140
140
 
141
141
  /***/ }),
142
142
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "well-waterfall",
3
- "version": "0.0.6",
3
+ "version": "0.0.8",
4
4
  "description": "An attribute-based wrapper of SwiperJS for Webflow",
5
5
  "main": "waterfall.js",
6
6
  "scripts": {
package/src/waterfall.js CHANGED
@@ -48,8 +48,13 @@ $("[waterfall]").each(function (index) {
48
48
  }
49
49
  };
50
50
 
51
- // Autoplay configuration
52
- if (parseBool(getAttrOrDefault($this, "autoplayMode", false))) {
51
+ //------- Modules --------------------------------
52
+
53
+ // AUTOPLAY
54
+ const autoplayMode = parseBool(getAttrOrDefault($this, "autoplayMode", false));
55
+ printDebug("AUTOPLAY MODE", autoplayMode);
56
+
57
+ if (autoplayMode) {
53
58
  swiperConfig.autoplay = {
54
59
  delay: parseInt(getAttrOrDefault($this, "delay", 0), 10),
55
60
  disableOnInteraction: parseBool(getAttrOrDefault($this, "disableOnInteraction", false)),
@@ -59,10 +64,13 @@ $("[waterfall]").each(function (index) {
59
64
  };
60
65
  }
61
66
 
62
- // Pagination configuration
67
+ // PAGINATION
68
+ const paginationMode = parseBool(getAttrOrDefault($this, "paginationMode", false));
69
+ printDebug("PAGINATION MODE", paginationMode);
63
70
  const paginationEl = $this.find("[waterfall-el='pagination']")[0];
64
71
  printDebug("PAGINATION", paginationEl);
65
- if (paginationEl && parseBool(getAttrOrDefault($this, "paginationMode", false))) {
72
+
73
+ if (paginationMode) {
66
74
  swiperConfig.pagination = {
67
75
  el: paginationEl,
68
76
  clickable: parseBool(getAttrOrDefault($this, "paginationClickable", true)),
@@ -73,9 +81,10 @@ $("[waterfall]").each(function (index) {
73
81
  };
74
82
  }
75
83
 
76
- // Navigation configuration
84
+ // NAVIGATION
77
85
  const navigationMode = parseBool(getAttrOrDefault($this, "navigationMode", false));
78
86
  printDebug('NAVIGATION', navigationMode);
87
+
79
88
  if (navigationMode) {
80
89
  swiperConfig.navigation = {
81
90
  nextEl: $this.find("[waterfall-el='next']")[0],
@@ -85,12 +94,15 @@ $("[waterfall]").each(function (index) {
85
94
  printDebug("PREV BUTTON", swiperConfig.navigation.prevEl);
86
95
  }
87
96
 
88
- // Scrollbar configuration
97
+ // SCROLLBAR
98
+ const scrollbarMode = parseBool(getAttrOrDefault($this, "scrollbarMode", false));
99
+ printDebug("SCROLLBAR MODE", scrollbarMode);
89
100
  const scrollbarEl = $this.find("[waterfall-el='scrollbar']");
90
- const scrollbarDrag = $(scrollbarEl).find("[waterfall-el='scrollbar-drag']");
91
101
  printDebug("SCROLLBAR", scrollbarEl);
92
- printDebug("SCROLLBAR DRAG", scrollbarEl);
93
- if (scrollbarEl && parseBool(getAttrOrDefault($this, "scrollbarMode", false))) {
102
+ const scrollbarDrag = $(scrollbarEl).find("[waterfall-el='scrollbar-drag']");
103
+ printDebug("SCROLLBAR DRAG", scrollbarDrag);
104
+
105
+ if (scrollbarMode) {
94
106
  swiperConfig.scrollbar = {
95
107
  dragClass: scrollbarDrag.attr("class"),
96
108
  dragSize: "auto",