issue-5-product-gamesystems #10

Merged
sebastian merged 31 commits from issue-5-product-gamesystems into main 2024-02-16 18:00:29 +01:00
2 changed files with 10 additions and 2 deletions
Showing only changes of commit 18bdacb5e9 - Show all commits

View File

@ -1,7 +1,7 @@
<table mat-table [dataSource]="dataSource">
<ng-container *ngFor="let col of displayedColumns; let i = index" [matColumnDef]="col.internalName">
<th mat-header-cell *matHeaderCellDef>{{col.displayedName}}</th>
<td mat-cell *matCellDef="let transition" [matTooltip]="getLeafStateByIndex(transition, i).stateDescription">
<th mat-header-cell *matHeaderCellDef (dblclick)="openGamesystemEditor(i)">{{col.displayedName}}</th>
<td mat-cell *matCellDef="let transition" [matTooltip]="getLeafStateByIndex(transition, i).stateDescription" (dblclick)="openGamesystemEditor(i)">
{{getLeafStateByIndex(transition, i).stateLabel}}
</td>
</ng-container>

View File

@ -86,4 +86,12 @@ export class ProductTransitionEditorComponent implements OnInit{
return leafStates[index];
}
openGamesystemEditor(leafIndex: number) {
const leafGamesystems = LeafGamesystemCalculator.calcLeafGeamesystems(this.gamesystem!);
if(leafIndex < this.numberLeafSystems) {
this.onOpenGamesystem.emit(leafGamesystems[leafIndex])
} else {
this.onOpenGamesystem.emit(leafGamesystems[leafIndex - this.numberLeafSystems])
}
}
}