Comments (11)
hey guys, running into the same issue with the WheelGesturesPlugin
here's a snippet that sort of fixes this issue:
embalaApi.on('settle', (api: CarouselApi) => {
if (!api) {
return;
}
const { limit, location, scrollTo } = api.internalEngine();
if (location.get() > limit.max) {
scrollTo.index(0, 0);
}
if (location.get() < limit.min) {
scrollTo.index(embalaApi.scrollSnapList().length - 1, 1);
}
});
Ideally it would be nice to reset the momentum early so it never gets to this or take so long to rubber band back.
from embla-carousel.
Thanks @sarussss and @DanielSpindler. I'll throw a comment in here once the bug fix has been released.
from embla-carousel.
Hi @davidjerleke
I checked, the problem I had before has been resolved, great!
from embla-carousel.
Hi @DanielSpindler,
This was reported by @sarussss here but I havenโt had the time to create a bug report:
Thanks for doing it for me.
Best,
David
from embla-carousel.
@DanielSpindler and/or @sarussss,
Can you reproduce this problem in this CodeSandbox?
from embla-carousel.
@davidjerleke https://codesandbox.io/p/sandbox/bug-785-forked-psk7k8?file=%2Fsrc%2Fjs%2Fembla-carousel.js%3A1857%2C25-1857%2C30 seems to work just fine, cant reproduce anymore
from embla-carousel.
Thanks alot and no Problem!
Greetings,
Daniel
from embla-carousel.
https://codesandbox.io/p/sandbox/embla-carousel-default-react-forked-vcjj84?file=%2Fsrc%2Fjs%2FEmblaCarouselArrowButtons.tsx updated the other CodeSandBox for now @davidjerleke, @sarussss seems like it is not gone, will update it in a live app today and give a feedback after
from embla-carousel.
@DanielSpindler did you try the CodeSandbox in this comment? Because a fix for this has not released yet!
from embla-carousel.
@davidjerleke my fault ive been reading it wrong sorry! do you have a version with
"embla-carousel-wheel-gestures": "^8.0.0-rc05"
cant reproduce with dragging anymore
from embla-carousel.
@DanielSpindler you can fork the CodeSandbox and add the Wheel Gestures plugin and test it if you want.
from embla-carousel.
Related Issues (20)
- [Bug]: Direction rtl reverses y axis direction HOT 5
- [Bug]: Angular autoplay error HOT 1
- [Bug]: Autoplay fast scroll when opened in a new tab HOT 7
- [Bug]: no specific name for plugin import, have to use "index" instead HOT 4
- [Bug]: Embla Carousel's animation becomes less smooth when the battery saving mode is enabled. HOT 1
- [Bug]: Render when slides are wider than view size HOT 5
- [Bug]: When using the wheel gesture to swipe the carousel, for the first slide and the last slide, there are excessive blank space. HOT 2
- [Bug]: Thumbnails example won't work in RTL HOT 2
- [Bug]: Height is getting set to 0 HOT 4
- [Bug]: Scroll broken after direction update HOT 15
- [Bug]: Jest testing bug return TypeError: undefined is not a function HOT 2
- [Bug]: Bad scroll progress reporting when loop = true HOT 1
- [Bug]: beforeUnmount destroys too soon during Vue transitions HOT 10
- [Bug]: Fade example missing dependency and missing vanilla examples HOT 10
- [Bug]: Image disperses after window resize HOT 1
- [Bug]: Fade plugin has wrong peer dependency version
- [Bug]: any type for `Autoplay` plugin options
- [Bug]: iOS Stutter HOT 3
- [Bug]: Video with controls in slide interferes with swiping HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from embla-carousel.