@@ -597,7 +597,6 @@ export class BiowcPathwaygraph extends LitElement {
597
597
if ( this . applicationMode !== 'editing' ) {
598
598
this . applicationMode = 'viewing' ;
599
599
}
600
- this . switchApplicationMode ( this . applicationMode ) ;
601
600
602
601
this . d3Nodes = [ ] ;
603
602
this . d3Links = [ ] ;
@@ -607,6 +606,7 @@ export class BiowcPathwaygraph extends LitElement {
607
606
this . _getMainDiv ( ) . on ( 'mousedown' , ( ) => {
608
607
this . dispatchEvent ( new CustomEvent ( 'pathwayGraphChanged' ) ) ;
609
608
} ) ;
609
+ this . switchApplicationMode ( this . applicationMode ) ;
610
610
611
611
this . _enableZoomingAndPanning ( ) ;
612
612
@@ -5353,6 +5353,16 @@ font-family: "Roboto Light", "Helvetica Neue", "Verdana", sans-serif'><strong st
5353
5353
// The 'viewing' class has no effect right now, but I'm using it in analogy to the 'editing' class below,
5354
5354
// which has a CSS style
5355
5355
this . _getMainDiv ( ) . attr ( 'class' , 'viewing' ) ;
5356
+
5357
+ // If backups exist, apply them
5358
+ if ( ! ! this . ptmInputListBackup && this . ptmInputListBackup . length > 0 )
5359
+ this . ptmInputList = this . ptmInputListBackup ;
5360
+ if (
5361
+ ! ! this . fullProteomeInputListBackup &&
5362
+ this . fullProteomeInputListBackup . length > 0
5363
+ )
5364
+ this . fullProteomeInputList = this . fullProteomeInputListBackup ;
5365
+
5356
5366
// Clear the backups
5357
5367
this . ptmInputListBackup = [ ] ;
5358
5368
this . fullProteomeInputListBackup = [ ] ;
@@ -5369,13 +5379,6 @@ font-family: "Roboto Light", "Helvetica Neue", "Verdana", sans-serif'><strong st
5369
5379
this . _getMainDiv ( ) . attr ( 'class' , 'editing' ) ;
5370
5380
this . hue = 'direction' ;
5371
5381
5372
- /**
5373
- * Note to future self: Maybe need to comment out Lines 1368ff in PTMNavigator:
5374
- * this.graphdataSkeleton = undefined
5375
- * this.selectedCanonicalPathway = undefined
5376
- * this.selectedCustomPathway = undefined
5377
- */
5378
-
5379
5382
// Keep a backup of the input lists to reapply it later
5380
5383
this . ptmInputListBackup = this . ptmInputList ;
5381
5384
this . fullProteomeInputListBackup = this . fullProteomeInputList ;
@@ -5386,6 +5389,8 @@ font-family: "Roboto Light", "Helvetica Neue", "Verdana", sans-serif'><strong st
5386
5389
. select < SVGElement > ( '#pathwayLegend' )
5387
5390
. selectAll ( '*' )
5388
5391
. remove ( ) ;
5392
+
5393
+ if ( this . graphdataSkeleton . nodes . length > 0 ) this . _refreshGraph ( false ) ;
5389
5394
}
5390
5395
}
5391
5396
}
0 commit comments