Skip to content

Commit f31750b

Browse files
committed
Be able to scroll over all importers in schema explorer.
1 parent 7812607 commit f31750b

File tree

1 file changed

+40
-18
lines changed

1 file changed

+40
-18
lines changed

web/src/components/SchemaGraphDialog.tsx

Lines changed: 40 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export default function SchemaGraphDialog (props: Props) {
2626
}
2727
}
2828

29-
useEffect(() => { setSelectedSources(sources) }, [sources]);
29+
// useEffect(() => { setSelectedSources(sources) }, [sources]);
3030

3131
return (
3232
<Dialog open={props.open}
@@ -35,24 +35,28 @@ export default function SchemaGraphDialog (props: Props) {
3535
className={styles.dialog}
3636
PaperProps={{ className: styles.dialogPaper }}>
3737
<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>
3844
<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>
4654
</div>
4755
<FontAwesomeIcon
4856
icon={faTimes}
4957
className={styles.closeIcon}
5058
size="2x" onClick={props.onClose}
5159
style={{ width: 32 }} />
52-
<SchemaGraphExplorer
53-
backgroundColor={theme.palette.background.default}
54-
sources={selectedSources}
55-
hideObservations={hideObservations} />
5660
</div>
5761
</Dialog>
5862
)
@@ -67,7 +71,7 @@ const useStyles = makeStyles(theme => ({
6771
overflow: "hidden",
6872
},
6973
schemaExplorerContainer: {
70-
height: "100%",
74+
height: '100%',
7175
},
7276
closeIcon: {
7377
position: "absolute",
@@ -81,17 +85,35 @@ const useStyles = makeStyles(theme => ({
8185
}
8286
},
8387
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',
8896
backgroundColor: "rgba(23, 23, 23, 0)",
8997
opacity: 0.7,
9098
'&:hover': {
9199
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%",
93108
},
94109
sourcesList: {
110+
},
111+
schemaGraphExplorer: {
112+
position: "absolute",
113+
top: 0,
114+
left: 0,
115+
width: "100%",
116+
height: "100%",
95117
}
96118
}));
97119

0 commit comments

Comments
 (0)