1
1
const subnav = document . getElementById ( 'subnav' )
2
2
const contentdoc = document . getElementById ( 'content-doc' )
3
3
const contentexamples = document . getElementById ( 'content-examples' )
4
+ const examplewelcome = document . getElementById ( 'exampleWelcome' )
5
+ const examplecode = document . getElementById ( 'exampleCode' )
4
6
const examplelinks = document . getElementById ( 'exampleLinks' )
5
7
const tocdoc = document . getElementById ( 'toc-doc' )
6
8
const searchToggle = document . getElementById ( 'checkbox-search-toggle' )
@@ -42,6 +44,8 @@ toggleExamples = (mode) => {
42
44
43
45
loadExamplefromGitHub = ( name , dir , editor ) => {
44
46
function load ( data ) {
47
+ examplecode . style . display = 'flex'
48
+ examplewelcome . style . display = 'none'
45
49
editor . setValue ( data )
46
50
highlightKeyword ( editor )
47
51
}
@@ -138,7 +142,6 @@ let treedata =
138
142
}
139
143
]
140
144
} ,
141
- /*
142
145
{ "id" : "0-2" , "text" : "Wave propagation" , "children" :
143
146
[
144
147
{ "id" : "0-2-0" , "text" : "Frequency domain" , "children" :
@@ -147,13 +150,16 @@ let treedata =
147
150
{ "id" : "Maxwell" , "text" : "Maxwell's equations" }
148
151
]
149
152
} ,
153
+ /*
150
154
{ "id": "0-2-1", "text": "Time domain"
151
155
}
156
+ */
152
157
]
153
158
} ,
159
+ /*
154
160
{ "id": "diffusion", "text": "Diffusion"
155
161
},
156
- */
162
+ */
157
163
]
158
164
} ,
159
165
{ "id" : "1" , "text" : "Spatial dimension" , "children" :
@@ -225,7 +231,7 @@ fetch('/_static/json/all_examples.json')
225
231
updateList ( editor )
226
232
let tree = new Tree ( '.tag-tree-container' , {
227
233
data : treedata ,
228
- closeDepth : 3 ,
234
+ closeDepth : 4 ,
229
235
loaded : function ( ) {
230
236
//this.values = ['0-0-0', '0-1-1'];
231
237
//console.log(this.selectedNodes);
0 commit comments