refactor: Layer
This commit is contained in:
@@ -12,6 +12,6 @@
|
||||
<img src="./images/base-layer--blank.svg">
|
||||
</div>
|
||||
<svg-keyboard *ngIf="selectedKeymap?.abbreviation"
|
||||
[moduleConfig]="selectedKeymap.layers[0].modules.elements">
|
||||
[moduleConfig]="selectedKeymap.layers[0].modules">
|
||||
</svg-keyboard>
|
||||
</div>
|
||||
@@ -3,7 +3,7 @@
|
||||
<div class="keyboard-slider" (mouseout)="hideTooltip($event)">
|
||||
<svg-keyboard *ngFor="let layer of layers"
|
||||
[@layerState]="layer.animation"
|
||||
[moduleConfig]="layer.modules.elements"
|
||||
[moduleConfig]="layer.modules"
|
||||
(keyClick)="onKeyClick($event.moduleId, $event.keyId)"
|
||||
(keyHover)="onKeyHover($event.moduleId, $event.event, $event.over, $event.keyId)"
|
||||
>
|
||||
|
||||
@@ -130,7 +130,7 @@ export class SvgKeyboardWrapComponent implements OnChanges {
|
||||
onKeyClick(moduleId: number, keyId: number): void {
|
||||
if (!this.popoverShown && this.popoverEnabled) {
|
||||
this.keyEditConfig = {
|
||||
keyActions: this.layers[this.currentLayer].modules.elements[moduleId].keyActions.elements,
|
||||
keyActions: this.layers[this.currentLayer].modules[moduleId].keyActions.elements,
|
||||
keyId
|
||||
};
|
||||
|
||||
@@ -140,7 +140,7 @@ export class SvgKeyboardWrapComponent implements OnChanges {
|
||||
}
|
||||
|
||||
onKeyHover(moduleId: number, event: MouseEvent, over: boolean, keyId: number): void {
|
||||
let keyActionToEdit: KeyAction = this.layers[this.currentLayer].modules.elements[moduleId].keyActions.elements[keyId];
|
||||
let keyActionToEdit: KeyAction = this.layers[this.currentLayer].modules[moduleId].keyActions.elements[keyId];
|
||||
|
||||
if (this.tooltipEnabled) {
|
||||
if (over) {
|
||||
|
||||
Reference in New Issue
Block a user