Skip to content

Commit f09b2e4

Browse files
authored
Merge pull request #74 from reactome/logo-update
Logo update
2 parents fb83f8d + c35dea2 commit f09b2e4

36 files changed

Lines changed: 3908 additions & 2470 deletions

projects/pathway-browser/src/app/details/common/external-reference/external-reference.component.ts

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
import {Component, computed, input} from '@angular/core';
2-
import {ReferenceEntity} from "../../../model/graph/reference-entity/reference-entity.model";
3-
import {EntityService} from "../../../services/entity.service";
4-
import {isArray, isString} from "lodash";
5-
import {NgClass, TitleCasePipe} from "@angular/common";
6-
import {StructureViewerComponent} from "../../tabs/molecule-tab/structure-viewer/structure-viewer.component";
7-
import {DatabaseIdentifier} from "../../../model/graph/database-identifier.model";
8-
import {MatIconButton} from "@angular/material/button";
9-
import {MatIcon} from "@angular/material/icon";
10-
import {UrlStateService} from "../../../services/url-state.service";
11-
import {MatTooltip} from "@angular/material/tooltip";
12-
import {DataStateService} from "../../../services/data-state.service";
13-
import {Labels} from "../../../constants/constants";
14-
import {StructureService} from "../../../services/structure.service";
15-
import {MoleculeType} from "../../tabs/molecule-tab/molecule-tab.component";
1+
import { Component, computed, input } from '@angular/core';
2+
import { ReferenceEntity } from '../../../model/graph/reference-entity/reference-entity.model';
3+
import { EntityService } from '../../../services/entity.service';
4+
import { isArray, isString } from 'lodash';
5+
import { NgClass, TitleCasePipe } from '@angular/common';
6+
import { StructureViewerComponent } from '../../tabs/molecule-tab/structure-viewer/structure-viewer.component';
7+
import { DatabaseIdentifier } from '../../../model/graph/database-identifier.model';
8+
import { MatIconButton } from '@angular/material/button';
9+
import { MatIcon } from '@angular/material/icon';
10+
import { UrlStateService } from '../../../services/url-state.service';
11+
import { MatTooltip } from '@angular/material/tooltip';
12+
import { DataStateService } from '../../../services/data-state.service';
13+
import { Labels } from '../../../constants/constants';
14+
import { StructureService } from '../../../services/structure.service';
15+
import { MoleculeType } from '../../tabs/molecule-tab/molecule-tab.component';
1616

1717
@Component({
1818
selector: 'cr-external-reference',
@@ -25,11 +25,10 @@ import {MoleculeType} from "../../tabs/molecule-tab/molecule-tab.component";
2525
MatIconButton,
2626
MatTooltip,
2727
NgClass,
28-
StructureViewerComponent
29-
]
28+
StructureViewerComponent,
29+
],
3030
})
3131
export class ExternalReferenceComponent {
32-
3332
readonly referenceEntity = input.required<ReferenceEntity>();
3433
readonly xRefs = input<DatabaseIdentifier[]>([]);
3534

@@ -42,22 +41,28 @@ export class ExternalReferenceComponent {
4241
moleculeType = computed(() => {
4342
const entity = this.referenceEntity();
4443
return entity ? entity.moleculeType : null;
45-
})
46-
47-
hasStructure = computed(() => this.moleculeType() === MoleculeType.PROTEIN || this.moleculeType() === MoleculeType.CHEMICAL);
44+
});
4845

46+
hasStructure = computed(() =>
47+
[
48+
MoleculeType.CHEMICAL,
49+
MoleculeType.CHEMICAL_DRUG,
50+
MoleculeType.PROTEIN,
51+
].includes(this.moleculeType() as MoleculeType)
52+
);
4953

50-
constructor(private entity: EntityService,
51-
private state: UrlStateService,
52-
public data: DataStateService,
53-
private structure: StructureService) {
54-
}
54+
constructor(
55+
private entity: EntityService,
56+
private state: UrlStateService,
57+
public data: DataStateService,
58+
private structure: StructureService
59+
) {}
5560

5661
protected readonly isString = isString;
5762
protected readonly isArray = isArray;
5863

5964
onSelect() {
60-
this.state.select.set(this.referenceEntity().stId!)
65+
this.state.select.set(this.referenceEntity().stId!);
6166
}
6267

6368
protected readonly Labels = Labels;

projects/pathway-browser/src/app/details/details.component.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ <h3> 📋 Reactome Knowledgebase Details </h3>
2525
<p>Loading details of {{ state.select() || state.pathwayId() }}</p>
2626
</div>
2727
} @else if (obj()) {
28-
<cr-description-tab [obj]="obj()!" [analysisResult]="analysis.result()"></cr-description-tab>
28+
<cr-description-tab [obj]="obj()!" [analysisResult]="analysis.result()" [showReactionDiagram]="false"></cr-description-tab>
2929
}
3030
</ng-template>
3131
</mat-tab>

0 commit comments

Comments
 (0)