fix: should calc cloest point correctly, close: #116

This commit is contained in:
Benjy Cui
2016-07-11 09:53:38 +08:00
parent d4ae5a5298
commit e2504d99fe
+1 -1
View File
@@ -270,7 +270,7 @@ class Slider extends React.Component {
const points = Object.keys(marks).map(parseFloat);
if (step !== null) {
const closestStep = Math.round(val / step) * step;
const closestStep = (Math.round((val - min) / step) * step) + min;
points.push(closestStep);
}