You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Which variants of Embla Carousel are relevant to this feature request?
embla-carousel (Core)
embla-carousel-react
embla-carousel-vue
embla-carousel-svelte
embla-carousel-autoplay
embla-carousel-auto-scroll
embla-carousel-solid
embla-carousel-auto-height
embla-carousel-class-names
embla-carousel-fade
embla-carousel-docs (Documentation)
embla-carousel-docs (Generator)
Feature description
Request for a Free-Snap mode that has the momentum physics of drag-free, but still always snaps to slide once it decay.
I managed to achieve a version of this using a 'settle' event event that I had to hack by creating my own settle threshold:
`function fireCustomSettle(emblaApi: EmblaCarouselType) {
const engine = emblaApi.internalEngine();
const { dragHandler, location, target} = engine;
It works ok, but doesn't work with wheel events at all as momentum is killed at soon as wheel event stop. Maybe if I had more time I could perfect my scroll wheel solution. This isn't strictly part of the ticket, but was my overall goal to begin with. I tried to create a Wheel Inertia function that would simulate a drag impulse, but I couldn't get it to play nicely with the above Custom settle logic.
I love Embla and think you've created a superior slide package in quite a few ways with better docs and organised api than most out there, and completely understand if you don't have the time or the funding to make this feature. I hope you don't take offence to my comparison to keen, but the reason for my request is because they have a free-snap mode, that I was able to successfully create wheel handling logic for quite easily that simulates the drag impulse, but then at low speed, just lets the internal physics engine control the snapping. However I prefer embla in many other ways so was hoping in the future this could be added. All the best.
Additional Context
Additional details here...
Before submitting
I've made research efforts and searched the documentation
I've searched for existing issues
I agree to follow this project's Contributing Guidelines for feature requests
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Which variants of Embla Carousel are relevant to this feature request?
Feature description
Request for a Free-Snap mode that has the momentum physics of drag-free, but still always snaps to slide once it decay.
I managed to achieve a version of this using a 'settle' event event that I had to hack by creating my own settle threshold:
`function fireCustomSettle(emblaApi: EmblaCarouselType) {
const engine = emblaApi.internalEngine();
const { dragHandler, location, target} = engine;
}`
It works ok, but doesn't work with wheel events at all as momentum is killed at soon as wheel event stop. Maybe if I had more time I could perfect my scroll wheel solution. This isn't strictly part of the ticket, but was my overall goal to begin with. I tried to create a Wheel Inertia function that would simulate a drag impulse, but I couldn't get it to play nicely with the above Custom settle logic.
I love Embla and think you've created a superior slide package in quite a few ways with better docs and organised api than most out there, and completely understand if you don't have the time or the funding to make this feature. I hope you don't take offence to my comparison to keen, but the reason for my request is because they have a free-snap mode, that I was able to successfully create wheel handling logic for quite easily that simulates the drag impulse, but then at low speed, just lets the internal physics engine control the snapping. However I prefer embla in many other ways so was hoping in the future this could be added. All the best.
Additional Context
Additional details here...
Before submitting
Beta Was this translation helpful? Give feedback.
All reactions