@@ -10,11 +10,55 @@ import ExpandMoreIcon from '@material-ui/icons/ExpandMore';
1010import ChevronRightIcon from '@material-ui/icons/ChevronRight' ;
1111import ControlPanelTreeItem from './ControlPanelTreeItem' ;
1212import { experimentLabelColor } from '../../theme' ;
13- import { TreeItemExpandIcon } from './NetPyNEIcons' ;
14-
1513import { MODEL_STATE } from '../../constants' ;
1614
1715const useStyles = makeStyles ( ( ) => ( {
16+ root : {
17+ '& ul' : {
18+ position : 'relative' ,
19+ '&::before' : {
20+ content : '""' ,
21+ height : 'calc(100% - 0.85rem)' ,
22+ width : '0.0625rem' ,
23+ position : 'absolute' ,
24+ left : '-0.65rem' ,
25+ borderRadius : '3.125rem' ,
26+ top : '0rem' ,
27+ backgroundImage : 'url("data:image/svg+xml,%3Csvg width=\'1\' height=\'8\' viewBox=\'0 0 1 8\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath d=\'M0 0H1V8H0V0Z\' fill=\'%23ffffff\'/%3E%3C/svg%3E")' ,
28+ backgroundRepeat : 'repeat' ,
29+ } ,
30+ '& .MuiTreeItem-root' : {
31+ position : 'relative' ,
32+ '&::before' : {
33+ content : '""' ,
34+ height : '0.875rem' ,
35+ width : '1.4375rem' ,
36+ backgroundImage : 'url("data:image/svg+xml,%3Csvg width=\'12\' height=\'6\' viewBox=\'0 0 12 6\' fill=\'none\' xmlns=\'http://www.w3.org/2000/svg\'%3E%3Cpath d=\'M6 6C2.68629 6 0 3.31371 0 0H1C1 2.80391 3.19609 5 6 5V6Z\' fill=\'%23ffffff\'/%3E%3Cpath d=\'M6 5H11.5C11.7761 5 12 5.22386 12 5.5C12 5.77614 11.7761 6 11.5 6H6V5Z\' fill=\'%23ffffff\'/%3E%3C/svg%3E")' ,
37+ position : 'absolute' ,
38+ top : '0.75rem' ,
39+ backgroundRepeat : 'no-repeat' ,
40+ left : '-0.65rem' ,
41+ } ,
42+ '&::after' : {
43+ content : '""' ,
44+ height : '0.0625rem' ,
45+ borderRadius : '3.125rem' ,
46+ width : '0.5rem' ,
47+ backgroundColor : '#ffffff' ,
48+ position : 'absolute' ,
49+ left : '0' ,
50+ top : '1.0625rem' ,
51+ display : 'none' ,
52+ } ,
53+ '&:hover' : {
54+ background : 'transparent' ,
55+ } ,
56+ '&:focus > .MuiTreeItem-content' : {
57+ backgroundColor : 'transparent' ,
58+ } ,
59+ } ,
60+ } ,
61+ } ,
1862 header : {
1963 '& .MuiTypography-root' : {
2064 color : experimentLabelColor ,
@@ -102,7 +146,7 @@ const ExperimentControlPanel = (props) => {
102146 < TextField label = "Filter results" variant = "outlined" fullWidth onChange = { ( e ) => setFilter ( e . target . value ) } />
103147 < Box className = { classes . header } display = "flex" justifyContent = "space-between" mt = { 1 } >
104148 < Typography > Name</ Typography >
105- < Typography > Type(s)</ Typography >
149+ < Typography style = { { marginLeft : '3rem' } } > Type(s)</ Typography >
106150 < Typography > Controls</ Typography >
107151 </ Box >
108152 < TreeView
@@ -111,7 +155,14 @@ const ExperimentControlPanel = (props) => {
111155 defaultCollapseIcon = { < ExpandMoreIcon /> }
112156 defaultExpandIcon = { < ChevronRightIcon /> }
113157 >
114- < TreeItem nodeId = "network" label = "network_netpyne" expandIcon = { < TreeItemExpandIcon /> } >
158+ < TreeItem
159+ className = { classes . root }
160+ nodeId = "network"
161+ label = "network_netpyne"
162+ defaultCollapseIcon = { false }
163+ defaultExpandIcon = { false }
164+ defaultEndIcon = { false }
165+ >
115166 { filter === ''
116167 ? getTreeItemsFromData ( window . Instances . network . getChildren ( ) )
117168 : getFlatFilteredList ( window . Instances . network . getChildren ( ) ) }
0 commit comments