tiny-slider icon indicating copy to clipboard operation
tiny-slider copied to clipboard

Feature Request: drag threshold

Open ZeroCho opened this issue 4 years ago • 5 comments

Issue description:
First, thank you for great library. I think it would be better if this library has drag threshold. Currently, slides change even with one pixel movement. It's very uncomfortable when using in mobile(Some touches are regarded as drags in mobile, so some slide changes with one touch)

Demo link/slider setting:
https://flickity.metafizzy.co/options.html#dragthreshold

ZeroCho avatar Jul 17 '19 15:07 ZeroCho

We have a bug caused by too sensitive Slider, is there any chance this feature request will be done any time soon? Otherwise we would have to completely replace the slider, which is a lot of work.

codexp avatar Mar 09 '21 10:03 codexp

I've found where to place the option, this may possibly be half of work already: tiny-slider.js:2605 (v2.9.2)

              if(Math.abs(dist) < 50) {
                indexMoved = 0;
              }

between those two lines:

              indexMoved = dist > 0 ? Math.floor(indexMoved) : Math.ceil(indexMoved);
              index += indexMoved;

50 has to be replaced with option value, default could be 15 or so.

codexp avatar Mar 09 '21 11:03 codexp

+1 for this option!

joebillings avatar Sep 08 '21 08:09 joebillings

+1

dijkermans avatar Feb 12 '22 13:02 dijkermans

This would be a great feature and one that I tried to implement but I keep getting lots of errors when trying to make changes and minifying the js. Has anyone been able to get this thing working?

jqn avatar Oct 07 '22 06:10 jqn