+ {{displayedColumns[i]}} |
{{getLeafState(state, i).stateLabel}}
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 066e478..1c7a7e8 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
@@ -29,6 +29,8 @@ export class ProductStateEditorComponent implements OnInit{
@Input() templateElement: TemplateElement | undefined
@Output('onOpenGamesystemEditor') openGamesystemEditorEmitter = new EventEmitter();
displayedColumns: string[] = [];
+ internalColumnNames: string[] = []
+
expandedColumns: string[] = []
datasource = new MatTableDataSource();
@@ -38,7 +40,12 @@ export class ProductStateEditorComponent implements OnInit{
this.gamesystem!.generateFromChildsystems();
this.generateColumnNamesRecursively(this.gamesystem!, "");
this.displayedColumns.push('Initial');
- this.expandedColumns = [...this.displayedColumns, 'expand'];
+
+ this.internalColumnNames = this.displayedColumns.concat();
+
+ this.renameDuplicateColumnNames(this.internalColumnNames)
+
+ this.expandedColumns = [...this.internalColumnNames, 'expand'];
if(this.templateElement == undefined) {
this.datasource.data = this.gamesystem!.states;
@@ -52,6 +59,20 @@ export class ProductStateEditorComponent implements OnInit{
}
}
+ private renameDuplicateColumnNames(columnNames: string[]) {
+ for(let i=0; i {
if(innerGamesystem instanceof SimpleGamesystem) {
diff --git a/src/app/editor/gamesystem-editor/transition-editor/product-transition-editor/product-transition-editor.component.ts b/src/app/editor/gamesystem-editor/transition-editor/product-transition-editor/product-transition-editor.component.ts
index 6c12eec..8bf42e1 100644
--- a/src/app/editor/gamesystem-editor/transition-editor/product-transition-editor/product-transition-editor.component.ts
+++ b/src/app/editor/gamesystem-editor/transition-editor/product-transition-editor/product-transition-editor.component.ts
@@ -50,6 +50,8 @@ export class ProductTransitionEditorComponent implements OnInit{
const leafGamesystems: SimpleGamesystem[] = LeafGamesystemCalculator.calcLeafGeamesystems(this.gamesystem);
this.displayedColumns = leafGamesystems.map(leafGamesystem => new DisplayedColumnName(leafGamesystem.componentName, leafGamesystem.componentName + "-start"));
this.displayedColumns = this.displayedColumns.concat( leafGamesystems.map(leafGamesystem => new DisplayedColumnName(leafGamesystem.componentName, leafGamesystem.componentName + "-end")));
+ this.renameDuplicateColumnNames(this.displayedColumns)
+
this.numberLeafSystems = leafGamesystems.length;
this.columns = this.displayedColumns.map(column => column.internalName)
@@ -72,6 +74,20 @@ export class ProductTransitionEditorComponent implements OnInit{
}
}
+ private renameDuplicateColumnNames(columnNames: DisplayedColumnName[]) {
+ for(let i=0; i |