File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change 22
22
} ;
23
23
var options = {
24
24
physics : {
25
- enabled : false
25
+ enabled : true ,
26
+ solver : 'repulsion'
26
27
} ,
27
28
edges : {
28
29
smooth : false // Make edges straight lines.
34
35
var container = document . getElementById ( 'network' ) ;
35
36
var network = new vis . Network ( container , data , options ) ;
36
37
var seed = network . getSeed ( ) ;
38
+ network . on ( "stabilizationIterationsDone" , function ( ) {
39
+ network . setOptions ( { physics : false } ) ;
40
+ } ) ;
37
41
38
42
const vscode = acquireVsCodeApi ( ) ;
39
43
const helpTextDiv = document . getElementById ( 'helpText' ) ;
270
274
}
271
275
options . layout . randomSeed = seed ;
272
276
network = new vis . Network ( container , data , options ) ;
277
+ network . on ( "stabilizationIterationsDone" , function ( ) {
278
+ network . setOptions ( { physics : false } ) ;
279
+ } ) ;
273
280
}
274
281
275
282
} ( ) ) ;
You can’t perform that action at this time.
0 commit comments