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 08626c82bcce0a503d11aa58d75ab22994aa91c8..ba5fad90a56abf9492b4f3b46ba2f3ad16c94348 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 7169d9d9784701eb62faacb05ef52a6415539eda..4d67343ca88d204b04f4666e8b2b8458354cbe86 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 d727afaa555840bdd90d86bc0552b3f2cf3cb80b..e76e7f82672deb88fc2c1f37e9402fbd033ecdf4 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>