Compare commits

...
1 Commits
Author SHA1 Message Date
simaQ ccdaa08a9a bug fix 2015-07-15 16:21:40 +08:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "rc-slider", "name": "rc-slider",
"version": "1.2.9", "version": "1.2.10",
"description": "slider ui component for react", "description": "slider ui component for react",
"keywords": [ "keywords": [
"react", "react",
+1 -1
View File
@@ -82,7 +82,7 @@ var Slider = React.createClass({
return Math.floor((value - props.min) / props.step); return Math.floor((value - props.min) / props.step);
} else { } else {
var unit = ((props.max - props.min) / (props.marks.length - 1)).toFixed(5); var unit = ((props.max - props.min) / (props.marks.length - 1)).toFixed(5);
return Math.ceil(value / unit); return Math.round(value / unit);
} }
}, },