This commit is contained in:
parent
19cfe82905
commit
4dbed5a855
@ -54,7 +54,7 @@
|
|||||||
|
|
||||||
<ng-container matColumnDef="expand">
|
<ng-container matColumnDef="expand">
|
||||||
<th mat-header-cell *matHeaderCellDef aria-label="row actions">
|
<th mat-header-cell *matHeaderCellDef aria-label="row actions">
|
||||||
<button mat-icon-button><mat-icon>add</mat-icon></button>
|
<button mat-icon-button (click)="addState()"><mat-icon>add</mat-icon></button>
|
||||||
</th>
|
</th>
|
||||||
<td mat-cell *matCellDef="let element">
|
<td mat-cell *matCellDef="let element">
|
||||||
<button mat-icon-button aria-label="expand row" (click)="(expandedElement = expandedElement === element ? null : element); $event.stopPropagation()">
|
<button mat-icon-button aria-label="expand row" (click)="(expandedElement = expandedElement === element ? null : element); $event.stopPropagation()">
|
||||||
|
@ -68,4 +68,15 @@ export class SimpleStateEditorComponent implements OnInit{
|
|||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
addState() {
|
||||||
|
if(this.gamesystem != undefined) {
|
||||||
|
const simpleState = this.gamesystem.createState("New State", "");
|
||||||
|
if(simpleState != undefined) {
|
||||||
|
this.dataSource.data = this.gamesystem.states;
|
||||||
|
this.editedElement = simpleState;
|
||||||
|
this.expandedElement = simpleState;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user