Fix key bind animation side effect
This commit is contained in:
@@ -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 */
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user