Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 2 additions & 4 deletions frontend/src/app/heatmap/heatmap.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -249,11 +249,9 @@ export class HeatmapComponent implements AfterViewInit, OnInit {
}
});

dialogRef.afterClosed().subscribe(result => {
if (result === true) {
// Reload the heatmap data after weights successfully updated
dialogRef.afterClosed().subscribe(() => {
// Reload the heatmap data after weights successfully updated or canceled
this.loadHeatmapData();
Comment thread
marcorosa marked this conversation as resolved.
}
});
}
}
11 changes: 10 additions & 1 deletion frontend/src/app/weight-dialog/weight-dialog.component.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
.dialog-container {
padding: 15px;
max-height: 90vh;
}

.dialog-title {
Expand All @@ -20,9 +21,17 @@
}
}

.input-container {
.weight-form-container {
width: 60%;
margin: auto;
padding-top: 10px;
overflow-y: auto;
}

.weight-form-section {
width: 90%;
margin: auto;
max-height: 70vh;
}
Comment thread
cabch marked this conversation as resolved.

.mat-mdc-form-field {
Expand Down
22 changes: 12 additions & 10 deletions frontend/src/app/weight-dialog/weight-dialog.component.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,18 @@ <h2 mat-dialog-title>
{{ data.title }}
</h2>
</div>
<div class="input-container">
<form>
<div *ngFor="let attack of attackNames">
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ attack }}</mat-label>
<input matInput type="number" min="0" step="1" [(ngModel)]="currentWeights[attack]"
name="{{ attack }}" />
</mat-form-field>
</div>
</form>
<div class="weight-form-container">
<div class="weight-form-section">
<form>
<div *ngFor="let attack of attackNames">
<mat-form-field appearance="outline" class="form-field">
<mat-label>{{ attack }}</mat-label>
<input matInput type="number" min="0" step="1" [(ngModel)]="currentWeights[attack]"
name="{{ attack }}" />
</mat-form-field>
</div>
</form>
</div>
Comment thread
cabch marked this conversation as resolved.
</div>
<div mat-dialog-actions align="end" class="dialog-actions">
<button mat-stroked-button color="warn" (click)="dialogRef.close()">
Expand Down