diff --git a/src/components/macro/macro.component.html b/src/components/macro/macro.component.html index 3c1c00b4..ba1d71e6 100644 --- a/src/components/macro/macro.component.html +++ b/src/components/macro/macro.component.html @@ -16,10 +16,9 @@ [macroAction]="macroAction" [editable]="true" [deletable]="true" - [moveable]="dragEnabled" + [moveable]="true" (save)="onSaveAction($event, index)" (edit)="onEditAction(macroActionIndex)" - (cancel)="onCancelEditAction()" (delete)="onDeleteAction(macroActionIndex)">
diff --git a/src/components/macro/macro.component.ts b/src/components/macro/macro.component.ts index c3fa4f48..a0062f53 100644 --- a/src/components/macro/macro.component.ts +++ b/src/components/macro/macro.component.ts @@ -24,7 +24,6 @@ export class MacroComponent implements OnInit, OnDestroy { private routeSubscription: Subscription; private hasChanges: boolean = false; - private dragEnabled: boolean; constructor( private uhkConfigurationService: UhkConfigurationService, @@ -44,7 +43,6 @@ export class MacroComponent implements OnInit, OnDestroy { this.routeSubscription = this.route.params.subscribe((params: { id: string }) => { const id: number = Number(params.id); this.macro = this.getMacro(id); - this.dragEnabled = true; this.hasChanges = false; }); } @@ -90,15 +88,9 @@ export class MacroComponent implements OnInit, OnDestroy { onEditAction(index: number) { // Hide other editors when clicking edit button of a macro action this.hideOtherActionEditors(index); - this.dragEnabled = false; - } - - onCancelEditAction() { - this.dragEnabled = true; } onSaveAction(macroAction: MacroAction, index: number) { - this.dragEnabled = true; this.hasChanges = true; this.macro.macroActions.elements[index] = macroAction; }