Skip to content
Snippets Groups Projects
Commit d8839a74 authored by jojohoch's avatar jojohoch
Browse files

[editor] Change initial values of stateVariables

parent 7ea63f89
No related branches found
No related tags found
No related merge requests found
......@@ -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>();
}
......@@ -25,7 +25,7 @@ export class StateVariablesDialogComponent {
}
addStateVariable() {
this.stateVariables.push({ id: 'NewState', value: '1' });
this.stateVariables.push({ id: 'NewState', value: '' });
}
deleteStateVariable(index: number) {
......
......@@ -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>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment