Commit e4fd9b7f authored by Valentin Hervieu's avatar Valentin Hervieu

Fix negative float values rendering as reported in #190

parent 3775ce08
......@@ -911,10 +911,7 @@
* @returns {number}
*/
roundStep: function(value) {
var step = this.step,
remainder = +((value - this.minValue) % step).toFixed(3),
steppedValue = remainder > (step / 2) ? value + step - remainder : value - remainder;
var steppedValue = Math.round(value / this.step) * this.step;
steppedValue = steppedValue.toFixed(this.precision);
return +steppedValue;
},
......
This diff is collapsed.
......@@ -911,10 +911,7 @@
* @returns {number}
*/
roundStep: function(value) {
var step = this.step,
remainder = +((value - this.minValue) % step).toFixed(3),
steppedValue = remainder > (step / 2) ? value + step - remainder : value - remainder;
var steppedValue = Math.round(value / this.step) * this.step;
steppedValue = steppedValue.toFixed(this.precision);
return +steppedValue;
},
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment