Compare commits

...
2 Commits
Author SHA1 Message Date
Benjy Cui 806cb06d76 bump 3.5.1 2016-03-22 17:22:43 +08:00
Benjy Cui 73b9953084 refactor: update Marks style algorithm 2016-03-22 17:21:50 +08:00
2 changed files with 6 additions and 3 deletions
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "rc-slider",
"version": "3.5.0",
"version": "3.5.1",
"description": "slider ui component for react",
"keywords": [
"react",
+5 -2
View File
@@ -16,8 +16,11 @@ const Marks = ({className, marks, included, upperBound, lowerBound, max, min}) =
[className + '-text-active']: isActived,
});
const style = { width: markWidth + '%' };
style.left = (point - min) / range * 100 - markWidth / 2 + '%';
const style = {
width: markWidth + '%',
marginLeft: -markWidth / 2 + '%',
};
style.left = (point - min) / range * 100 + '%';
const markPoint = marks[point];
const markPointIsObject = typeof markPoint === 'object' &&