Compare commits

..
3 Commits
Author SHA1 Message Date
Benjy Cui 80d4ee4794 bump 3.7.4 2016-07-11 09:55:12 +08:00
Benjy Cui e2504d99fe fix: should calc cloest point correctly, close: #116 2016-07-11 09:53:38 +08:00
Benjy Cui d4ae5a5298 deps: update 2016-07-11 09:48:44 +08:00
2 changed files with 9 additions and 9 deletions
+8 -8
View File
@@ -1,6 +1,6 @@
{ {
"name": "rc-slider", "name": "rc-slider",
"version": "3.7.3", "version": "3.7.4",
"description": "slider ui component for react", "description": "slider ui component for react",
"keywords": [ "keywords": [
"react", "react",
@@ -42,17 +42,17 @@
"pre-commit": "1.x", "pre-commit": "1.x",
"rc-server": "3.x", "rc-server": "3.x",
"rc-tools": "4.x", "rc-tools": "4.x",
"react": "~0.14.0", "react": "^15.2.1",
"react-addons-test-utils": "^0.14.0", "react-addons-test-utils": "^15.2.1",
"react-dom": "~0.14.0" "react-dom": "^15.2.1"
}, },
"pre-commit": [ "pre-commit": [
"lint" "lint"
], ],
"dependencies": { "dependencies": {
"classnames": "^2.2.1", "classnames": "^2.2.5",
"rc-tooltip": "3.x", "rc-tooltip": "^3.4.2",
"rc-util": "3.x", "rc-util": "^3.2.1",
"warning": "^2.1.0" "warning": "^3.0.0"
} }
} }
+1 -1
View File
@@ -270,7 +270,7 @@ class Slider extends React.Component {
const points = Object.keys(marks).map(parseFloat); const points = Object.keys(marks).map(parseFloat);
if (step !== null) { if (step !== null) {
const closestStep = Math.round(val / step) * step; const closestStep = (Math.round((val - min) / step) * step) + min;
points.push(closestStep); points.push(closestStep);
} }