You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I found a bug in the calculation of the formula in the _calculateNewMax function, but there is also a little bug with js like 0.1+0.2=0.30000000000000004
If we use the library for the price filter, namely the slider from it, and for example if prices come
max - 3469.98
min - 2833.05
step - 0.01
then the formula yields the number 3469.9800000000005
then there is a comparison and 3469.9800000000005 will be greater than 3469.98, we enter the condition and subtract from 3469.9800000000005 - 0.01 and we have 3469.97 at the output, so for example, in the filter we will never see a product with a maximum price
The text was updated successfully, but these errors were encountered:
version 1.13.2 also has this issue
below is the example, you can see the console values are not correspond with max1 , which is calculate by function _calculateNewMax
`
let max1=19.7,
min1=14.3
$( "#slider" ).slider({
min: min1,
max: max1,
range: true,
step: 0.1,
values: [ min1, max1 ],
create: function( event, ui ) {
console.log($(this).slider('values'))
}
});
I found a bug in the calculation of the formula in the _calculateNewMax function, but there is also a little bug with js like 0.1+0.2=0.30000000000000004
If we use the library for the price filter, namely the slider from it, and for example if prices come
max - 3469.98
min - 2833.05
step - 0.01
then the formula yields the number 3469.9800000000005
then there is a comparison and 3469.9800000000005 will be greater than 3469.98, we enter the condition and subtract from 3469.9800000000005 - 0.01 and we have 3469.97 at the output, so for example, in the filter we will never see a product with a maximum price
The text was updated successfully, but these errors were encountered: