Fix key bind animation side effect

This commit is contained in:
Farkas József
2016-12-14 22:48:18 +01:00
parent 42686f4221
commit 5e7e0c4933
9 changed files with 22 additions and 6 deletions

View File

@@ -59,6 +59,7 @@ export class SvgKeyboardKeyComponent implements OnInit, OnChanges, OnDestroy {
@Input() height: number;
@Input() width: number;
@Input() keyAction: KeyAction;
@Input() keybindAnimationEnabled: boolean;
@Output() keyClick = new EventEmitter();
enumLabelTypes = LabelTypes;
@@ -86,7 +87,9 @@ export class SvgKeyboardKeyComponent implements OnInit, OnChanges, OnDestroy {
/* tslint:disable:no-string-literal */
if (changes['keyAction']) {
this.setLabels();
this.animation = 'active';
if (this.keybindAnimationEnabled) {
this.animation = 'active';
}
}
/* tslint:enable:no-string-literal */
}