[Help]: Reducing Delay After Drag on Embla Carousel Auto Scroll #994
-
I’m using the Embla Carousel auto scroll plugin and here’s how I’ve implemented the key areas const OPTIONS: EmblaOptionsType = { loop: true, dragFree: true }
const [emblaRef, emblaApi] = useEmblaCarousel(options, [
AutoScroll({
playOnInit: true,
speed: 1,
stopOnInteraction: false,
startDelay: 0,
stopOnFocusIn: false
})
]) The issue I’m encountering happens when I drag the carousel while it's scrolling. After dragging, it scrolls to the intended position but then pauses for a few seconds before resuming. Is there any way to reduce or eliminate this delay after dragging? If applicable, which variants of Embla Carousel are relevant to this question?
Additional informationNo response CodeSandbox example |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 3 replies
-
@MarkForLoop please read what the emblaApi.emit('settle'); ...and fool the |
Beta Was this translation helpful? Give feedback.
-
2024-09-10.11-49-37.mp4 |
Beta Was this translation helpful? Give feedback.
@MarkForLoop you should run your code on
pointerUp
. See this CodeSandbox.