refactor: Macro

This commit is contained in:
Farkas József
2016-09-25 13:56:03 +02:00
parent 2aed594dd1
commit 140709e31f
4 changed files with 18 additions and 14 deletions

View File

@@ -58,8 +58,8 @@ export class MacroComponent implements OnInit, OnDestroy {
}
addAction() {
this.hideOtherActionEditors(this.macro.macroActions.elements.length);
this.macro.macroActions.elements.push(undefined);
this.hideOtherActionEditors(this.macro.macroActions.length);
this.macro.macroActions.push(undefined);
}
discardChanges() {
@@ -83,12 +83,12 @@ export class MacroComponent implements OnInit, OnDestroy {
onSaveAction(macroAction: MacroAction, index: number) {
this.hasChanges = true;
this.macro.macroActions.elements[index] = macroAction;
this.macro.macroActions[index] = macroAction;
}
onDeleteAction(index: number) {
// @ todo show confirm action dialog
this.macro.macroActions.elements.splice(index, 1);
this.macro.macroActions.splice(index, 1);
this.hasChanges = true;
}