diff --git a/projects/common/models/state-variable.ts b/projects/common/models/state-variable.ts index d9d37afd009ddb0407838ab7144d2c4b5932b71c..7028d02d79c7633fcfb3cbca69f9b5f393655e00 100644 --- a/projects/common/models/state-variable.ts +++ b/projects/common/models/state-variable.ts @@ -1,8 +1,4 @@ -export class StateVariable { +export interface StateVariable { id: string; value: string; - constructor(id: string, value: string) { - this.id = id; - this.value = value; - } } 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 ee07eb08fb0a4fdf41f72fa75f5c635549538ddd..08626c82bcce0a503d11aa58d75ab22994aa91c8 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 = new StateVariable('', ''); + @Input() stateVariable: StateVariable = { id: '', value: '' }; @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 c76afdd04be628ff59b294b90bceebb9f68b94d0..50e286c4f43f97080a2ac37f40e112b0c5697855 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 @@ -13,7 +13,7 @@ export class StateVariablesDialogComponent { } addStateVariable() { - this.stateVariables.push(new StateVariable('NewState', '1')); + this.stateVariables.push({ id: 'NewState', value: '1' }); } deleteStateVariable(index: number) {