mirror of
https://github.com/wassname/slider.git
synced 2026-10-27 13:21:07 +08:00
bug fix
This commit is contained in:
1 parent
58b18484fe
commit
ccdaa08a9a
2 files changed
+2
-2
No files matched your search
+1
-1
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "rc-slider",
|
||||
"version": "1.2.9",
|
||||
"version": "1.2.10",
|
||||
"description": "slider ui component for react",
|
||||
"keywords": [
|
||||
"react",
|
||||
|
||||
+1
-1
@@ -82,7 +82,7 @@ var Slider = React.createClass({
|
||||
return Math.floor((value - props.min) / props.step);
|
||||
} else {
|
||||
var unit = ((props.max - props.min) / (props.marks.length - 1)).toFixed(5);
|
||||
return Math.ceil(value / unit);
|
||||
return Math.round(value / unit);
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in new issue
Block a user