From d8839a742f8e590da12e0a5895b87f7723d83eb4 Mon Sep 17 00:00:00 2001 From: jojohoch <joachim.hoch@iqb.hu-berlin.de> Date: Wed, 28 Jun 2023 16:12:19 +0200 Subject: [PATCH] [editor] Change initial values of stateVariables --- .../state-variables-dialog/state-variable-editor.component.ts | 2 +- .../state-variables-dialog/state-variables-dialog.component.ts | 2 +- .../button-properties/button-properties.component.ts | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variable-editor.component.ts b/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variable-editor.component.ts index 08626c82b..ba5fad90a 100644 --- a/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variable-editor.component.ts +++ b/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variable-editor.component.ts @@ -8,6 +8,6 @@ import { StateVariable } from 'common/models/state-variable'; templateUrl: './state-variable-editor.component.html' }) export class StateVariableEditorComponent { - @Input() stateVariable: StateVariable = { id: '', value: '' }; + @Input() stateVariable!: StateVariable; @Output() stateVariableChange = new EventEmitter<StateVariable>(); } diff --git a/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variables-dialog.component.ts b/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variables-dialog.component.ts index 7169d9d97..4d67343ca 100644 --- a/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variables-dialog.component.ts +++ b/projects/editor/src/app/components/dialogs/state-variables-dialog/state-variables-dialog.component.ts @@ -25,7 +25,7 @@ export class StateVariablesDialogComponent { } addStateVariable() { - this.stateVariables.push({ id: 'NewState', value: '1' }); + this.stateVariables.push({ id: 'NewState', value: '' }); } deleteStateVariable(index: number) { diff --git a/projects/editor/src/app/components/properties-panel/model-properties-tab/input-groups/button-properties/button-properties.component.ts b/projects/editor/src/app/components/properties-panel/model-properties-tab/input-groups/button-properties/button-properties.component.ts index d727afaa5..e76e7f826 100644 --- a/projects/editor/src/app/components/properties-panel/model-properties-tab/input-groups/button-properties/button-properties.component.ts +++ b/projects/editor/src/app/components/properties-panel/model-properties-tab/input-groups/button-properties/button-properties.component.ts @@ -42,7 +42,7 @@ import { SelectionService } from '../../../../../services/selection.service'; [stateVariableIds]="unitService.unit.stateVariables | getStateVariableIds" [stateVariable]="combinedProperties.actionParam ? $any(combinedProperties.actionParam) : - {id: unitService.unit.stateVariables[0].id, value: unitService.unit.stateVariables[0].value}" + { id: unitService.unit.stateVariables[0].id, value: '' }" (stateVariableChange)="updateModel.emit({ property: 'actionParam', value: $event })"> </aspect-button-action-param-state-variable> <p *ngIf="!unitService.unit.stateVariables.length">Bitte zuerst Player-Variablen anlegen</p> -- GitLab