IonDen / ion.rangeSlider

jQuery only range slider
http://ionden.com/a/plugins/ion.rangeSlider/en.html
MIT License
2.56k stars 508 forks source link

Slider breaks on scientific Notations #684

Open p0ntsNL opened 4 years ago

p0ntsNL commented 4 years ago

The slider breaks when scientific notation numbers are used.

function my_prettify (n) { if (n == 0.00) { return "SL: "+n; }; if (n == 5.62e-06) { return "Entry: "+n; }; if (n == 0.00000566) { return "Price: "+n; }; return ""; } $("#range_MrbzQ21KoYsm, #range_MrbzQ21KoYxl").ionRangeSlider( { type: "double", grid: true, step: 1e-8, max: 6.226E-6, min: 0.00, to: 0.00000566, from: 5.62e-06, hide_min_max: true, from_fixed: true, to_fixed: true, force_edges: true, prettify: my_prettify });

p0ntsNL commented 4 years ago

it could also be the stepsize of 0.00000001

What is the max stepsize allowed?

IonDen commented 4 years ago

Hi, Slider is using normal javascript math functions. So, it could break if something is wrong in input numbers.

Look at this demo: https://jsfiddle.net/IonDen/1uvd3942/

p0ntsNL commented 4 years ago

Thank you!