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

decimal steps & margin: 'margin' must be divisible by step error #1163

Closed leongersen closed 2 years ago

leongersen commented 2 years ago

Still doesn't work for a some combinations of the value and step:

(1221.64 / 0.01) % 1 = 1.4551915228366852e-11

(1221.62 / 0.01) % 1 0.9999999999854481

Step/value combination is required for the currency amount

Originally posted by @Alex-Popov in https://github.com/leongersen/noUiSlider/issues/736#issuecomment-938626393

leongersen commented 2 years ago

@Alex-Popov I've just released noUiSlider 15.5.0, which removes this constraint. noUiSlider now handles mismatches in step and margin/padding/limit well, so this constraint is no longer needed. Thanks for reporting your edge-case!

Alex-Popov commented 2 years ago

@leongersen Thanks a lot!

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.