Skip to content

Commit c393678

Browse files
authored
Merge pull request #278 from iteratec/bugfix/buttonAndHeaderTextOverflow
Bugfix: aggregation chart menu overflow
2 parents 4cbe5e8 + e8fcd0c commit c393678

File tree

7 files changed

+51
-21
lines changed

7 files changed

+51
-21
lines changed

frontend/src/app/modules/aggregation/components/aggregation-chart/aggregation-chart.component.html

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -64,12 +64,13 @@
6464
</li>
6565
</ng-container>
6666
</ul>
67-
</div>
6867

69-
<div class="in-chart-buttons">
70-
<a data-toggle="modal" role="button" title="Download as PNG">
71-
<i class="fas fa-download"></i>
72-
</a>
68+
<div class="in-chart-buttons">
69+
<a data-toggle="modal" role="button" title="Download as PNG">
70+
<i class="fas fa-download"></i>
71+
</a>
72+
</div>
73+
7374
</div>
7475

7576
<div class="svg-container">

frontend/src/app/modules/aggregation/components/aggregation-chart/aggregation-chart.component.scss

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,35 @@ svg.aggregation-chart-svg {
1111
}
1212

1313
.in-chart-buttons {
14-
position: absolute;
15-
top: 10px;
16-
right: 10px;
1714
z-index: 2;
15+
position: relative;
16+
top: 0;
17+
right: 0;
1818
}
1919

20-
.filter-dropdown-group {
21-
display: flex;
22-
align-items: center;
23-
position: absolute;
24-
z-index: 2;
25-
top: 4px;
26-
right: 50px;
27-
padding: 6px 12px;
20+
@media screen and (max-width: 1650px) {
21+
.filter-dropdown-group {
22+
display: flex;
23+
justify-content: flex-end;
24+
align-items: center;
25+
z-index: 2;
26+
padding: 6px 12px;
27+
}
28+
}
2829

30+
@media screen and (min-width: 1651px) {
31+
.filter-dropdown-group {
32+
display: flex;
33+
align-items: center;
34+
position: absolute;
35+
top: 4px;
36+
right: 0;
37+
z-index: 2;
38+
padding: 6px 12px;
39+
}
40+
}
41+
42+
.filter-dropdown-group {
2943
ul > li > a {
3044
cursor: pointer;
3145
}

frontend/src/app/modules/aggregation/components/aggregation-chart/aggregation-chart.component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import {Component, ElementRef, Input, OnChanges, SimpleChanges, ViewChild} from '@angular/core';
1+
import {Component, ElementRef, Input, OnChanges, SimpleChanges, ViewChild, ViewEncapsulation} from '@angular/core';
22
import {ChartCommons} from "../../../../enums/chart-commons.enum";
33
import {select} from 'd3-selection';
44
import {max} from "d3-array";

frontend/src/app/modules/result-selection/components/measurands/measurands.component.html

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,14 @@
22
<h2>{{ 'frontend.de.iteratec.osm.resultSelection.measurands.title' | translate }}</h2>
33

44
<div class="measurand-card-content">
5-
<div class="row form-group" *ngFor="let metric of selectedMeasurands; index as i; trackBy:trackByFn; first as isFirst">
5+
<div class="row form-group"
6+
*ngFor="let metric of selectedMeasurands; index as i; trackBy:trackByFn; first as isFirst">
67
<label class="control-label col-sm-3" *ngIf="isFirst">
78
{{ 'frontend.de.iteratec.osm.resultSelection.measurands.title' | translate }}:
89
</label>
910
<div class="col-sm-8" [ngClass]="{'col-sm-offset-3': !isFirst}">
10-
<osm-measurand-select [selectedMeasurand]="metric" [perfAspectTypes$]="aspectTypes$" [selectableMeasurandGroups]="measurands$"
11+
<osm-measurand-select [selectedMeasurand]="metric" [perfAspectTypes$]="aspectTypes$"
12+
[selectableMeasurandGroups]="measurands$"
1113
(onSelect)="selectMeasurand(i, $event)"></osm-measurand-select>
1214
</div>
1315
<div class="col-sm-1 remove-measurand" *ngIf="!isFirst">
@@ -19,7 +21,9 @@ <h2>{{ 'frontend.de.iteratec.osm.resultSelection.measurands.title' | translate }
1921

2022
<div class="row form-group" *ngIf="multipleMeasurands">
2123
<div class="col-sm-8 col-sm-offset-3">
22-
<button type="button" id="add-measurand-button" class="btn btn-default btn-block" (click)="addMeasurandField()" [disabled]="resultSelectionStore.remainingResultSelection.fromComparative || resultSelectionStore.remainingResultSelection.toComparative">
24+
<button type="button" id="add-measurand-button" class="btn btn-default btn-block" (click)="addMeasurandField()"
25+
[title]="'frontend.de.iteratec.osm.resultSelection.measurands.add' | translate"
26+
[disabled]="resultSelectionStore.remainingResultSelection.fromComparative || resultSelectionStore.remainingResultSelection.toComparative">
2327
<i class="fas fa-plus"></i> {{ 'frontend.de.iteratec.osm.resultSelection.measurands.add' | translate }}
2428
</button>
2529
</div>

frontend/src/app/modules/result-selection/components/measurands/measurands.component.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,8 @@
1010
margin-top: 20px;
1111
margin-bottom: 20px;
1212
}
13+
14+
#add-measurand-button {
15+
overflow: hidden;
16+
text-overflow: ellipsis;
17+
}

frontend/src/app/modules/result-selection/components/time-frame/time-frame.component.html

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,8 @@ <h2>
7676

7777
<div class="row form-group" *ngIf="!comparativeSelectionActive && showComparativeTimeFrame">
7878
<div class="col-md-8 col-md-offset-3">
79-
<button type="button" id="show-comparative-button" class="btn btn-default btn-block" (click)="toggleComparativeSelection()" [disabled]="resultSelectionStore.remainingResultSelection.measurands?.length > 1">
79+
<button type="button" id="show-comparative-button" class="btn btn-default btn-block" [title]="'frontend.de.iteratec.osm.resultSelection.timeFrame.comparative.heading' | translate"
80+
(click)="toggleComparativeSelection()" [disabled]="resultSelectionStore.remainingResultSelection.measurands?.length > 1">
8081
<i class="fas fa-plus"></i> {{ 'frontend.de.iteratec.osm.resultSelection.timeFrame.comparative.heading' | translate }}
8182
</button>
8283
</div>

frontend/src/app/modules/result-selection/components/time-frame/time-frame.component.scss

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,8 @@
2121
.time-frame-label {
2222
text-align: right;
2323
}
24+
25+
#show-comparative-button {
26+
overflow: hidden;
27+
text-overflow: ellipsis;
28+
}

0 commit comments

Comments
 (0)