Skip to content

Commit e4fd9b7

Browse files
author
Valentin Hervieu
committed
Fix negative float values rendering as reported in #190
1 parent 3775ce0 commit e4fd9b7

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

dist/rzslider.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -911,10 +911,7 @@
911911
* @returns {number}
912912
*/
913913
roundStep: function(value) {
914-
var step = this.step,
915-
remainder = +((value - this.minValue) % step).toFixed(3),
916-
steppedValue = remainder > (step / 2) ? value + step - remainder : value - remainder;
917-
914+
var steppedValue = Math.round(value / this.step) * this.step;
918915
steppedValue = steppedValue.toFixed(this.precision);
919916
return +steppedValue;
920917
},

0 commit comments

Comments
 (0)