Commit b29da89 1 parent 911a295 commit b29da89 Copy full SHA for b29da89
File tree 7 files changed +2171
-1293
lines changed
7 files changed +2171
-1293
lines changed Original file line number Diff line number Diff line change
1
+ # Version 1.3.0
2
+ Released 2019-05-14
3
+
4
+ - Added support for touch events
5
+
1
6
# Version 1.2.1
2
7
Released 2018-09-08
3
8
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " react-multi-bar-slider" ,
3
- "version" : " 1.2.1 " ,
3
+ "version" : " 1.3.0 " ,
4
4
"description" : " Slider component with multiple bars for React" ,
5
5
"repository" : {
6
6
"type" : " git" ,
22
22
"emotion" : " ^9.x" ,
23
23
"prop-types" : " ^15.x" ,
24
24
"react" : " ^15.3.x || ^16.x" ,
25
- "react-emotion " : " ^9 .x" ,
26
- "react-dom " : " ^15.3.x || ^16 .x"
25
+ "react-dom " : " ^15.3.x || ^16 .x" ,
26
+ "react-emotion " : " ^9 .x"
27
27
},
28
28
"scripts" : {
29
29
"build" : " webpack --config webpack.config.babel.js" ,
54
54
"react-emotion" : " ^9.2.8" ,
55
55
"react-test-renderer" : " ^16.2.0" ,
56
56
"webpack" : " ^3.8.1"
57
+ },
58
+ "jest" : {
59
+ "testURL" : " http://localhost"
57
60
}
58
61
}
Original file line number Diff line number Diff line change @@ -33,6 +33,10 @@ const Slider = ({
33
33
onMouseUp = { onMouseMoveDeactivate }
34
34
onMouseLeave = { onMouseMoveDeactivate }
35
35
onMouseMove = { onMouseMove }
36
+ onTouchStart = { onMouseMoveActivate }
37
+ onTouchEnd = { onMouseMoveDeactivate }
38
+ onTouchCancel = { onMouseMoveDeactivate }
39
+ onTouchMove = { onMouseMove }
36
40
{ ...props }
37
41
>
38
42
{ children }
Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ exports[`Slider.js matches the snapshot 1`] = `
9
9
onMouseMove = { [Function ]}
10
10
onMouseUp = { [Function ]}
11
11
onSlide = { [Function ]}
12
+ onTouchCancel = { [Function ]}
13
+ onTouchEnd = { [Function ]}
14
+ onTouchMove = { [Function ]}
15
+ onTouchStart = { [Function ]}
12
16
readOnly = { false }
13
17
width = { 1000 }
14
18
>
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ export default class MultiSlider extends Component {
56
56
} ;
57
57
58
58
handleMouseMoveActivate = ( e ) => {
59
- const isLeftButton = e . button === 0 ;
59
+ const isLeftButton = ! e . button || e . button === 0 ;
60
60
if ( ! isLeftButton ) return ;
61
61
62
62
if ( this . state . mouseDown ) return ;
Original file line number Diff line number Diff line change @@ -8,6 +8,10 @@ exports[`MultiSlider.js matches the snapshot 1`] = `
8
8
onMouseLeave = { [Function ]}
9
9
onMouseMove = { [Function ]}
10
10
onMouseUp = { [Function ]}
11
+ onTouchCancel = { [Function ]}
12
+ onTouchEnd = { [Function ]}
13
+ onTouchMove = { [Function ]}
14
+ onTouchStart = { [Function ]}
11
15
readOnly = { false }
12
16
width = " 100%"
13
17
>
You can’t perform that action at this time.
0 commit comments