diff --git a/src/app/components/network-legend/network-legend.component.html b/src/app/components/network-legend/network-legend.component.html index 51ce68e097f08a51b8fd0396f880dd56e0b87cf1..8bc8d9fcbddd330f53def43c60ed0b57fc15ba35 100644 --- a/src/app/components/network-legend/network-legend.component.html +++ b/src/app/components/network-legend/network-legend.component.html @@ -11,7 +11,7 @@ <th> <img [src]="nodeGroup.value.image" class="legend-icon"/> </th> - <td> {{ nodeGroup.value.groupName }}</td> + <td class="group-name"> {{ nodeGroup.value.groupName }}</td> </ng-container> <ng-container *ngIf="!nodeGroup.value.image" [ngSwitch]="nodeGroup.value.shape"> @@ -51,11 +51,11 @@ <span class="node circle" [style.background-color]=nodeGroup.value.color.background> ... </span> - </th> + </th> <th *ngSwitchDefault> <span class="node {{ nodeGroup.value.shape }}" [style.background-color]=nodeGroup.value.color.background> </span> - </th> + </th> <td class="group-name"> {{ nodeGroup.value.groupName }}</td> </ng-container> </ng-container> @@ -70,7 +70,7 @@ <hr *ngIf="!edgeGroup.value.dashes" class="edge" [style.background-color]=edgeGroup.value.color> <hr *ngIf="edgeGroup.value.dashes" class="edge dashes" [style.color]=edgeGroup.value.color> </th> - <td> {{ edgeGroup.value.groupName }}</td> + <td class="group-name"> {{ edgeGroup.value.groupName }}</td> </ng-container> </tr> </ng-container> diff --git a/src/app/components/query-tile/query-tile.component.ts b/src/app/components/query-tile/query-tile.component.ts index c0ec32c60b3adfe77347ba2a5ec4551f27ee6ba3..3dfb65251d64d686254a73b289b21cf0c4e3b33e 100644 --- a/src/app/components/query-tile/query-tile.component.ts +++ b/src/app/components/query-tile/query-tile.component.ts @@ -24,7 +24,7 @@ export class QueryTileComponent { querySearch = (term: string, item: Wrapper) => { term = term.toLowerCase(); - const data = JSON.parse(JSON.stringify(item.data)); + const data = {...item.data} // add possible missing attributes to not throw errors if (data.ensg === undefined) {data.ensg = []}; if (data.groupName === undefined) {data.groupName = ''}; @@ -34,9 +34,9 @@ export class QueryTileComponent { if (data.uniprotAc === undefined) {data.uniprotAc = ''}; if (data.drugId === undefined) {data.drugId = ''}; - return data.symbol.toLowerCase().indexOf(term) > -1 || data.uniprotAc.toLowerCase().indexOf(term) > -1 || - data.label.toLowerCase().indexOf(term) > -1 || this.listStartsWith(data.ensg, term) || data.id.toLowerCase().indexOf(term) > -1 - || data.proteinName.toLowerCase().indexOf(term) > -1 || data.type.toLowerCase().indexOf(term) > -1 || + return data.symbol.toLowerCase().indexOf(term) > -1 || data.uniprotAc.toLowerCase().indexOf(term) > -1 || + data.label.toLowerCase().indexOf(term) > -1 || this.listStartsWith(data.ensg, term) || data.id.toLowerCase().indexOf(term) > -1 + || data.proteinName.toLowerCase().indexOf(term) > -1 || data.type.toLowerCase().indexOf(term) > -1 || data.groupName.toLowerCase().indexOf(term) > -1 || data.drugId.toLowerCase().indexOf(term) > -1; }