leongersen / noUiSlider

noUiSlider is a lightweight, ARIA-accessible JavaScript range slider with multi-touch and keyboard support. It is fully GPU animated: no reflows, so it is fast; even on older devices. It also fits wonderfully in responsive designs and has no dependencies.
https://refreshless.com/nouislider/
MIT License
5.64k stars 658 forks source link

Is there anyway to tell the direction of the drag event? #1182

Closed charlymz closed 2 years ago

charlymz commented 2 years ago

Hi i want to be able to tell when dragging left or right, i am connecting 2 sliders, one is a timeframe and the second a zoom, it can go down into 2 month views and then drag the range but need to keep going when reaching the limit of the 2 month slider and update the range for the new dates

leongersen commented 2 years ago

The direction is not available as a value in the event. You can capture/store the current value on every slide event, then compare the new value to determine the direction.

github-actions[bot] commented 2 years ago

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.