@@ -28,36 +28,53 @@ class TimerView extends React.Component<{appState: AppState}, {}> {
28
28
this . props . appState . resetTimer ( ) ;
29
29
}
30
30
}
31
- ;
32
31
33
- var PanZoom = React . createClass ( {
34
- render : function ( ) {
32
+ class Toolbar extends React . Component < { } , { } > {
33
+ render ( ) {
35
34
return (
36
-
37
35
< div className = "cy-panzoom" style = { { position : 'absolute' } } >
36
+ < Pan />
37
+ < Slider />
38
+ </ div >
39
+ ) ;
40
+ }
41
+ }
42
+
43
+ class Slider extends React . Component < { } , { } > {
44
+ render ( ) {
45
+ return (
46
+ < div >
47
+ < div className = "cy-panzoom-reset cy-panzoom-zoom-button" > < span className = "icon fa fa-expand" /> </ div >
38
48
< div className = "cy-panzoom-zoom-in cy-panzoom-zoom-button" > < span className = "icon fa fa-plus" /> </ div >
39
49
< div className = "cy-panzoom-zoom-out cy-panzoom-zoom-button" > < span className = "icon fa fa-minus" /> </ div >
40
- < div className = "cy-panzoom-reset cy-panzoom-zoom-button" > < span className = "icon fa fa-expand" /> </ div >
41
50
< div className = "cy-panzoom-slider" >
42
51
< div className = "cy-panzoom-slider-background" />
43
52
< div className = "cy-panzoom-slider-handle" style = { { top : '32.2203px' } } > < span className = "icon fa fa-minus" />
44
53
</ div >
45
54
< div className = "cy-panzoom-no-zoom-tick" style = { { top : 43 } } />
46
55
</ div >
47
- < div className = "cy-panzoom-panner" >
48
- < div className = "cy-panzoom-panner-handle" />
49
- < div className = "cy-panzoom-pan-up cy-panzoom-pan-button" />
50
- < div className = "cy-panzoom-pan-down cy-panzoom-pan-button" />
51
- < div className = "cy-panzoom-pan-left cy-panzoom-pan-button" />
52
- < div className = "cy-panzoom-pan-right cy-panzoom-pan-button" />
53
- < div className = "cy-panzoom-pan-indicator" style = { { display : 'none' } } />
54
- </ div >
55
56
</ div >
56
- ) ;
57
+ )
58
+ }
59
+ }
60
+
61
+ class Pan extends React . Component < { } , { } > {
62
+ render ( ) {
63
+ return (
64
+ < div className = "cy-panzoom-panner" >
65
+ < div className = "cy-panzoom-panner-handle" />
66
+ < div className = "cy-panzoom-pan-up cy-panzoom-pan-button" />
67
+ < div className = "cy-panzoom-pan-down cy-panzoom-pan-button" />
68
+ < div className = "cy-panzoom-pan-left cy-panzoom-pan-button" />
69
+ < div className = "cy-panzoom-pan-right cy-panzoom-pan-button" />
70
+ < div className = "cy-panzoom-pan-indicator" style = { { display : 'none' } } />
71
+ </ div >
72
+ )
57
73
}
58
- } ) ;
74
+ }
75
+
59
76
60
- ReactDOM . render ( < PanZoom /> , document . getElementById ( 'root' ) ) ;
77
+ ReactDOM . render ( < Toolbar /> , document . getElementById ( 'root' ) ) ;
61
78
62
79
// const appState = new AppState();
63
80
// ReactDOM.render(<TimerView appState={appState}/>, document.getElementById('root'));
0 commit comments