From f505b1a3610b55e869649b066aed8dd5b2bf7a8e Mon Sep 17 00:00:00 2001 From: Vadim Date: Wed, 4 May 2022 22:23:51 +0300 Subject: [PATCH] #84 : Validate autoplay duration value, add marquee demo --- src/docs/Carousel.svx | 33 +++++++++++++++++++++++++++++++++ src/utils/ProgressManager.js | 2 +- 2 files changed, 34 insertions(+), 1 deletion(-) diff --git a/src/docs/Carousel.svx b/src/docs/Carousel.svx index a5b8041..68bfabe 100644 --- a/src/docs/Carousel.svx +++ b/src/docs/Carousel.svx @@ -129,6 +129,39 @@ +## Marquee mode!anchorId:marquee-mode; + + {#each colors as { color, text } (color)} + + {/each} + + +```jsx + + {#each colors as { color, text } (color)} + + {/each} + +``` + + + ## Lazy loading of images!anchorId:features-lazy-loading; { this.reset() - const stepMs = Math.min(STEP_MS, this._autoplayDuration) + const stepMs = Math.min(STEP_MS, Math.max(this._autoplayDuration, 1)) let progress = -stepMs this._interval = setIntervalImmediate(async () => {