From 8f5d366dd9ca59c5bb788d1c81a5711a834221ca Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20B=C3=B6ckelmann?= Date: Mon, 12 Feb 2024 18:07:30 +0100 Subject: [PATCH] Display Initial Value of ProductStates in their Visualizer --- .../product-state-editor.component.html | 7 ++++++- .../product-state-editor.component.scss | 4 ++++ .../product-state-editor.component.ts | 8 ++++++-- 3 files changed, 16 insertions(+), 3 deletions(-) diff --git a/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.html b/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.html index 9f68652..2d1c8bb 100644 --- a/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.html +++ b/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.html @@ -1,7 +1,12 @@ - + diff --git a/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.scss b/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.scss index 1922e7f..d53103d 100644 --- a/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.scss +++ b/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.scss @@ -1,3 +1,7 @@ table { width: 100%; } + +.mat-column-Initial { + width: 32px; +} diff --git a/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.ts b/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.ts index e2d6008..0332f73 100644 --- a/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.ts +++ b/src/app/editor/gamesystem-editor/state-editor/product-state-editor/product-state-editor.component.ts @@ -13,8 +13,9 @@ import { } from "@angular/material/table"; import {SimpleState} from "../../../../game-model/gamesystems/SimpleState"; import {State} from "../../../../game-model/gamesystems/State"; -import {NgForOf} from "@angular/common"; +import {NgForOf, NgIf} from "@angular/common"; import {ProductState} from "../../../../game-model/gamesystems/ProductState"; +import {MatIcon} from "@angular/material/icon"; @Component({ selector: 'app-product-state-editor', @@ -30,7 +31,9 @@ import {ProductState} from "../../../../game-model/gamesystems/ProductState"; MatHeaderCellDef, MatCell, MatCellDef, - NgForOf + NgForOf, + NgIf, + MatIcon ], templateUrl: './product-state-editor.component.html', styleUrl: './product-state-editor.component.scss' @@ -45,6 +48,7 @@ export class ProductStateEditorComponent implements OnInit{ ngOnInit() { this.gamesystem!.generateFromChildsystems(); this.generateColumnNamesRecursively(this.gamesystem!, ""); + this.displayedColumns.push('Initial'); this.datasource.data = this.gamesystem!.states; }
{{col}}{{getStateLabel(state, i)}} + {{getStateLabel(state, i)}} + + {{state.initial? 'done':'close'}} + +