Dennyno Posted March 16, 2022 Share Posted March 16, 2022 Hi, I customised this demo, but I've seen that on mobile, slides start sliding also while vertical scrolling. It's the last library version, how to lock and force the carousel only for the real x-axis scroll (and maybe adding a little resistance//long swipe)? It's not natural to see the content shake while scrolling down the page, only if the user truly horizontally swipe it's a needed feature... Cheers See the Pen QWajmBg by DedaloD (@DedaloD) on CodePen Link to comment Share on other sites More sharing options...
Solution OSUblake Posted March 17, 2022 Solution Share Posted March 17, 2022 Well, you have 2 touch actions going on there, swiping and scrolling, so unless you move your finger perfectly up and down in a straight line, it might trigger the slider swipe. You can probably increase the minimumMovement on the Draggable so it's not so sensitive. Quote Number - By default, Draggable requires that the Draggable element moves more than 2 pixels in order to be interpreted as a drag, but you can change that threshold using minimumMovement. So minimumMovement: 6 would require that the Draggable element moves more than 6 pixels to be interpreted as a drag. 1 Link to comment Share on other sites More sharing options...
Dennyno Posted March 17, 2022 Author Share Posted March 17, 2022 @OSUblake u saved my day!Really thanks! I added a lot more than just 6... about 60~70 and seems working as it should now. 😁 🏆 I guess this should be the default friction threshold, otherwise it's really too much.... (imho) 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now