From 19f904d2bdf0b3e0dee6f4afecc678662751354d Mon Sep 17 00:00:00 2001 From: Michael Hartung <michi@Michaels-MacBook-Pro.local> Date: Tue, 28 Sep 2021 10:51:31 +0200 Subject: [PATCH] download button --- .../components/analysis-panel/analysis-panel.component.html | 3 ++- .../components/network-legend/network-legend.component.html | 6 +++--- .../components/network-legend/network-legend.component.ts | 1 + src/app/pages/explorer-page/explorer-page.component.html | 1 + 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/app/components/analysis-panel/analysis-panel.component.html b/src/app/components/analysis-panel/analysis-panel.component.html index bd38b6c4..f31d4510 100644 --- a/src/app/components/analysis-panel/analysis-panel.component.html +++ b/src/app/components/analysis-panel/analysis-panel.component.html @@ -136,7 +136,7 @@ <div class="tab-content" *ngIf="task && task.info.done" [class.is-visible]="tab === 'network'"> <div class="card-image canvas-content" #networkWithLegend> <div *ngIf="myConfig.showLegend"> - <app-network-legend [config]="myConfig" [context]="legendContext"></app-network-legend> + <app-network-legend [config]="myConfig" [context]="legendContext" [smallStyle]="smallStyle"></app-network-legend> </div> <div class="parent fullheight"> <div class="center image1 fullheight" #network> @@ -154,6 +154,7 @@ pTooltip="Take a screenshot of the current network." [tooltipStyleClass]="'drgstn drgstn-tooltip'" tooltipPosition="top" + [ngClass]="{ 'button-small': smallStyle }" (click)="toImage()"> <span class="icon"> <i class="fas fa-camera" aria-hidden="true"></i> diff --git a/src/app/components/network-legend/network-legend.component.html b/src/app/components/network-legend/network-legend.component.html index d1262293..bb1703f7 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 class="group-name"> {{ nodeGroup.value.groupName }}</td> + <td class="group-name" [ngClass]="{ 'text-normal': smallStyle }"> {{ nodeGroup.value.groupName }}</td> </ng-container> <ng-container *ngIf="!nodeGroup.value.image" [ngSwitch]="nodeGroup.value.shape"> @@ -56,7 +56,7 @@ <span class="node {{ nodeGroup.value.shape }}" [style.background-color]=nodeGroup.value.color.background> </span> </th> - <td class="group-name"> {{ nodeGroup.value.groupName }}</td> + <td class="group-name" [ngClass]="{ 'text-normal': smallStyle }"> {{ nodeGroup.value.groupName }}</td> </ng-container> </ng-container> </tr> @@ -69,7 +69,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 class="group-name"> {{ edgeGroup.value.groupName }}</td> + <td class="group-name" [ngClass]="{ 'text-normal': smallStyle }"> {{ edgeGroup.value.groupName }}</td> </ng-container> </tr> </ng-container> diff --git a/src/app/components/network-legend/network-legend.component.ts b/src/app/components/network-legend/network-legend.component.ts index 3b130aa4..a3a02b78 100644 --- a/src/app/components/network-legend/network-legend.component.ts +++ b/src/app/components/network-legend/network-legend.component.ts @@ -11,6 +11,7 @@ export class NetworkLegendComponent implements OnInit { @Input() context: legendContext; @Input() config: IConfig; + @Input() smallStyle: boolean; private contextNodeGroupsToDelete = { 'explorer': ['foundNode', 'foundDrug', 'seedNode', 'default', 'defaultDisorder'], diff --git a/src/app/pages/explorer-page/explorer-page.component.html b/src/app/pages/explorer-page/explorer-page.component.html index 09d34195..ca452e43 100644 --- a/src/app/pages/explorer-page/explorer-page.component.html +++ b/src/app/pages/explorer-page/explorer-page.component.html @@ -157,6 +157,7 @@ <app-network-legend [config]="myConfig" [context]="legendContext" + [smallStyle]="smallStyle" ></app-network-legend> </div> <div class="center image1 fullheight" #network> -- GitLab