Hide popover when you delete or switch keymap; Disable layer switch when popover is opened

This commit is contained in:
NejcZdovc
2016-11-17 07:12:38 +01:00
committed by József Farkas
parent 68d6dbe723
commit ff47222d21
6 changed files with 29 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
import { Component, Input } from '@angular/core';
import { Component, EventEmitter, Input, Output } from '@angular/core';
import { Store } from '@ngrx/store';
@@ -14,10 +14,9 @@ import { KeymapActions } from '../../../store/actions';
})
export class KeymapHeaderComponent {
@Input() keymap: Keymap;
@Output() deleted: EventEmitter<boolean> = new EventEmitter();
constructor(
private store: Store<AppState>
) { }
constructor(private store: Store<AppState>) { }
setDefault() {
if (!this.keymap.isDefault) {
@@ -26,6 +25,7 @@ export class KeymapHeaderComponent {
}
removeKeymap() {
this.deleted.emit(false);
this.store.dispatch(KeymapActions.removeKeymap(this.keymap.abbreviation));
}