File tree Expand file tree Collapse file tree 3 files changed +13
-16
lines changed Expand file tree Collapse file tree 3 files changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -26,8 +26,7 @@ export class ShowComponentHierarchy extends ShowHierarchyBase {
26
26
return ;
27
27
case 'setGraphState' :
28
28
const newGraphState : GraphState = JSON . parse ( message . text ) ;
29
- this . graphState . networkSeed = newGraphState . networkSeed ;
30
- this . graphState . nodePositions = newGraphState . nodePositions ;
29
+ this . graphState = newGraphState ;
31
30
this . setNewState ( this . graphState ) ;
32
31
return ;
33
32
}
Original file line number Diff line number Diff line change @@ -23,8 +23,7 @@ export class ShowModuleHierarchy extends ShowHierarchyBase {
23
23
return ;
24
24
case 'setGraphState' :
25
25
const newGraphState : GraphState = JSON . parse ( message . text ) ;
26
- this . graphState . networkSeed = newGraphState . networkSeed ;
27
- this . graphState . nodePositions = newGraphState . nodePositions ;
26
+ this . graphState = newGraphState ;
28
27
this . setNewState ( this . graphState ) ;
29
28
return ;
30
29
}
Original file line number Diff line number Diff line change 37
37
network . setOptions ( {
38
38
physics : false
39
39
} ) ;
40
- nodes . forEach ( function ( node ) {
41
- nodes . update ( {
42
- id : node . id ,
43
- fixed : false
44
- } ) ;
45
- } ) ;
40
+ unfixNodes ( ) ;
46
41
postGraphState ( ) ;
47
42
} ) ;
48
43
network . on ( 'dragEnd' , postGraphState ) ;
375
370
network . setOptions ( {
376
371
physics : false
377
372
} ) ;
378
- nodes . forEach ( function ( node ) {
379
- nodes . update ( {
380
- id : node . id ,
381
- fixed : false
382
- } ) ;
383
- } ) ;
373
+ unfixNodes ( ) ;
384
374
postGraphState ( ) ;
385
375
} ) ;
386
376
network . on ( 'dragEnd' , postGraphState ) ;
413
403
return nodePositions ;
414
404
}
415
405
406
+ function unfixNodes ( ) {
407
+ nodes . forEach ( function ( node ) {
408
+ nodes . update ( {
409
+ id : node . id ,
410
+ fixed : false
411
+ } ) ;
412
+ } ) ;
413
+ }
414
+
416
415
} ( ) ) ;
You can’t perform that action at this time.
0 commit comments