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.66k stars 659 forks source link

Correlation between padding and step options #1150

Closed YuriKwon closed 3 years ago

YuriKwon commented 3 years ago

Initial setting

range: {
  min: 0,
  max: 100
},
padding: [20, 20],
start: [20],
step: 10

After creating the slider with the above setting, updating the step option to 7 results in the following error:

스크린샷 2021-07-22 오후 3 31 53

I don't quite understand this error message. Does the padding value have to be a multiple of steps? If so, please explain why it should be.

leongersen commented 3 years ago

Does the padding value have to be a multiple of steps?

Yes, that is the case. This prevents ambiguity in the options (with a step of 7 and a padding of 20, the padding ends up at either 14 or 21, effectively).

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.