Repository navigation
[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 |
Answered by
davidjerleke
Sep 10, 2024
Replies: 2 comments 3 replies
|
@MarkForLoop please read what the emblaApi.emit('settle');...and fool the |
1 reply
2024-09-10.11-49-37.mp4 |
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
@MarkForLoop you should run your code on
pointerUp. See this CodeSandbox.