Skip to content

Commit

Permalink
Metabolic pathways visualisation (#731): reopen tabs from url link on…
Browse files Browse the repository at this point in the history
… fresh environment (#817)
  • Loading branch information
DmitriiKrasnov authored Apr 29, 2022
1 parent d91e189 commit 9ff4996
Showing 1 changed file with 37 additions and 16 deletions.
53 changes: 37 additions & 16 deletions client/client/app/app.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,31 @@ export default class ngbAppController extends baseController {

/* @ngInject */
constructor(dispatcher,
projectContext,
miewContext,
heatmapContext,
ngbPathwaysService,
eventHotkey,
$stateParams,
$rootScope,
$scope,
$state,
$mdDialog,
projectDataService,
genomeDataService,
localDataService,
utilsDataService,
apiService,
appearanceContext) {
projectContext,
appLayout,
miewContext,
heatmapContext,
ngbPathwaysService,
eventHotkey,
$stateParams,
$rootScope,
$scope,
$state,
$mdDialog,
projectDataService,
genomeDataService,
localDataService,
utilsDataService,
apiService,
appearanceContext) {
super();
Object.assign(this, {
$scope,
$state,
$stateParams,
$mdDialog,
dispatcher,
appLayout,
eventHotkey,
genomeDataService,
projectContext,
Expand Down Expand Up @@ -235,6 +237,10 @@ export default class ngbAppController extends baseController {
.convertTracksStateFromJson(tracks)
.filter(track => track.format !== 'BLAST')
: null;
const layoutChange = this.appLayout.Panels.pathways;
layoutChange.displayed = true;
this.dispatcher.emitSimpleEvent('layout:item:change', {layoutChange});

this.projectContext.changeState({
chromosome: chromosome ? {name: chromosome} : null,
position: (start && !end) ? start : null,
Expand All @@ -243,6 +249,21 @@ export default class ngbAppController extends baseController {
viewport: position,
filterDatasets: filterByGenome ? filterByGenome : null
});
if (miew) {
const layoutChange = this.appLayout.Panels.molecularViewer;
layoutChange.displayed = true;
this.dispatcher.emitSimpleEvent('layout:item:change', {layoutChange});
}
if (heatmap) {
const layoutChange = this.appLayout.Panels.heatmap;
layoutChange.displayed = true;
this.dispatcher.emitSimpleEvent('layout:item:change', {layoutChange});
}
if (pathway) {
const layoutChange = this.appLayout.Panels.pathways;
layoutChange.displayed = true;
this.dispatcher.emitSimpleEvent('layout:item:change', {layoutChange});
}
}

initStateFromParams() {
Expand Down

0 comments on commit 9ff4996

Please sign in to comment.