well-waterfall 1.2.5 → 1.2.6

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "well-waterfall",
3
- "version": "1.2.5",
3
+ "version": "1.2.6",
4
4
  "description": "Create Swipers in Webflow with attributes",
5
5
  "main": "dist/index.umd.js",
6
6
  "module": "dist/index.es.js",
@@ -39,11 +39,17 @@ export function playbackConfig(config: SwiperOptions, el: HTMLElement) {
39
39
  config.loopPreventsSliding = parseBoolean(el, ATTR_LOOP_PREVENTS_SLIDING, true);
40
40
  // Autoplay
41
41
  const autoplayMode = parseBoolean(el, ATTR_AUTOPLAY, false);
42
+
43
+ // Smooth Autoplay
44
+ const smoothAutoplay = parseBoolean(el, ATTR_SMOOTH_AUTOPLAY, false);
45
+ let delay = parseNumber(el, ATTR_DELAY, undefined);
46
+ if (smoothAutoplay) delay = 0;
47
+
42
48
  if (autoplayMode) {
43
49
  // Add CSS for Smooth Autoplay
44
50
  setSmoothAutoplay();
45
51
  config.autoplay = {
46
- delay: parseNumber(el, ATTR_DELAY, undefined),
52
+ delay,
47
53
  disableOnInteraction: parseBoolean(el, ATTR_DISABLE_ON_INTERACTION, false), // documentation says default is true, doesn't appear to be correct
48
54
  reverseDirection: parseBoolean(el, ATTR_REVERSE_DIRECTION, false),
49
55
  pauseOnMouseEnter: parseBoolean(el, ATTR_PAUSE_ON_MOUSE_ENTER, false),