fix: uncheck 'Remap on all keyboard' and 'Remap on all layer' checkbox by default (#754)
* fix: uncheck 'Remap on all keyboard' and 'Remap on all layer' checkbox by default * fix: popover checkbox checked state
This commit is contained in:
committed by
László Monda
parent
b5cff2fa93
commit
475ec71983
+2
@@ -125,6 +125,8 @@ export class SvgKeyboardKeyComponent implements OnInit, OnChanges, OnDestroy {
|
||||
shiftPressed: this.pressedShiftLocation > -1,
|
||||
altPressed: this.pressedAltLocation > -1
|
||||
});
|
||||
this.pressedShiftLocation = -1;
|
||||
this.pressedAltLocation = -1;
|
||||
}
|
||||
|
||||
@HostListener('mousedown', ['$event'])
|
||||
|
||||
@@ -22,8 +22,7 @@
|
||||
[currentKeymap]="keymap"
|
||||
[currentLayer]="currentLayer"
|
||||
[allowLayerDoubleTap]="allowLayerDoubleTap"
|
||||
[remapOnAllKeymap]="remapOnAllKeymap"
|
||||
[remapOnAllLayer]="remapOnAllLayer"
|
||||
[remapInfo]="remapInfo"
|
||||
(cancel)="hidePopover()"
|
||||
(remap)="onRemap($event)"></popover>
|
||||
|
||||
|
||||
@@ -48,6 +48,7 @@ import {
|
||||
SvgKeyboardKeyClickEvent,
|
||||
SvgKeyHoverEvent
|
||||
} from '../../../models/svg-key-events';
|
||||
import { RemapInfo } from '../../../models/remap-info';
|
||||
|
||||
interface NameValuePair {
|
||||
name: string;
|
||||
@@ -87,8 +88,10 @@ export class SvgKeyboardWrapComponent implements OnInit, OnChanges {
|
||||
layers: Layer[];
|
||||
keyPosition: ClientRect;
|
||||
wrapPosition: ClientRect;
|
||||
remapOnAllKeymap: boolean;
|
||||
remapOnAllLayer: boolean;
|
||||
remapInfo: RemapInfo = {
|
||||
remapOnAllKeymap: false,
|
||||
remapOnAllLayer: false
|
||||
};
|
||||
|
||||
private wrapHost: HTMLElement;
|
||||
private keyElement: HTMLElement;
|
||||
@@ -156,8 +159,10 @@ export class SvgKeyboardWrapComponent implements OnInit, OnChanges {
|
||||
this.selectedKey = {layerId: this.currentLayer, moduleId: event.moduleId, keyId: event.keyId};
|
||||
const keyActionToEdit: KeyAction = this.layers[this.currentLayer].modules[event.moduleId].keyActions[event.keyId];
|
||||
this.keyElement = event.keyTarget;
|
||||
this.remapOnAllKeymap = event.shiftPressed;
|
||||
this.remapOnAllLayer = event.altPressed;
|
||||
this.remapInfo = {
|
||||
remapOnAllKeymap: event.shiftPressed,
|
||||
remapOnAllLayer: event.altPressed
|
||||
};
|
||||
this.showPopover(keyActionToEdit);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user