@@ -26,7 +26,7 @@ export default function SchemaGraphDialog (props: Props) {
26
26
}
27
27
}
28
28
29
- useEffect ( ( ) => { setSelectedSources ( sources ) } , [ sources ] ) ;
29
+ // useEffect(() => { setSelectedSources(sources) }, [sources]);
30
30
31
31
return (
32
32
< Dialog open = { props . open }
@@ -35,24 +35,28 @@ export default function SchemaGraphDialog (props: Props) {
35
35
className = { styles . dialog }
36
36
PaperProps = { { className : styles . dialogPaper } } >
37
37
< div className = { styles . schemaExplorerContainer } >
38
+ < div className = { styles . schemaGraphExplorer } >
39
+ < SchemaGraphExplorer
40
+ backgroundColor = { theme . palette . background . default }
41
+ sources = { selectedSources }
42
+ hideObservations = { hideObservations } />
43
+ </ div >
38
44
< div className = { styles . leftControl } >
39
- < SourcesList
40
- sources = { props . sources . sort ( ) }
41
- selected = { selectedSources }
42
- showObservation = { ! hideObservations }
43
- onShowObservationsClick = { ( ) => setHideObservations ( ! hideObservations ) }
44
- className = { styles . sourcesList }
45
- onSourceClick = { handleSourceClick } />
45
+ < div className = { styles . leftControlChild } >
46
+ < SourcesList
47
+ sources = { props . sources . sort ( ) }
48
+ selected = { selectedSources }
49
+ showObservation = { ! hideObservations }
50
+ onShowObservationsClick = { ( ) => setHideObservations ( ! hideObservations ) }
51
+ className = { styles . sourcesList }
52
+ onSourceClick = { handleSourceClick } />
53
+ </ div >
46
54
</ div >
47
55
< FontAwesomeIcon
48
56
icon = { faTimes }
49
57
className = { styles . closeIcon }
50
58
size = "2x" onClick = { props . onClose }
51
59
style = { { width : 32 } } />
52
- < SchemaGraphExplorer
53
- backgroundColor = { theme . palette . background . default }
54
- sources = { selectedSources }
55
- hideObservations = { hideObservations } />
56
60
</ div >
57
61
</ Dialog >
58
62
)
@@ -67,7 +71,7 @@ const useStyles = makeStyles(theme => ({
67
71
overflow : "hidden" ,
68
72
} ,
69
73
schemaExplorerContainer : {
70
- height : " 100%" ,
74
+ height : ' 100%' ,
71
75
} ,
72
76
closeIcon : {
73
77
position : "absolute" ,
@@ -81,17 +85,35 @@ const useStyles = makeStyles(theme => ({
81
85
}
82
86
} ,
83
87
leftControl : {
84
- position : "absolute" ,
85
- top : theme . spacing ( ) ,
86
- left : theme . spacing ( ) ,
87
- borderRadius : 5 ,
88
+ padding : theme . spacing ( ) ,
89
+ display : "inline-block" ,
90
+ height : `calc(100% - ${ 2 * theme . spacing ( ) } px)` ,
91
+ zIndex : 10000 ,
92
+ } ,
93
+ leftControlChild : {
94
+ display : "inline-block" ,
95
+ border : '1px solid grey' ,
88
96
backgroundColor : "rgba(23, 23, 23, 0)" ,
89
97
opacity : 0.7 ,
90
98
'&:hover' : {
91
99
backgroundColor : "rgba(23, 23, 23, 1)" ,
92
- }
100
+ } ,
101
+ '-ms-overflow-style' : 'none' , /* IE and Edge */
102
+ scrollbarWidth : 'none' ,
103
+ '&::-webkit-scrollbar' : {
104
+ display : "none" ,
105
+ } ,
106
+ overflow : "auto" ,
107
+ height : "100%" ,
93
108
} ,
94
109
sourcesList : {
110
+ } ,
111
+ schemaGraphExplorer : {
112
+ position : "absolute" ,
113
+ top : 0 ,
114
+ left : 0 ,
115
+ width : "100%" ,
116
+ height : "100%" ,
95
117
}
96
118
} ) ) ;
97
119
0 commit comments