refactor: Module

This commit is contained in:
Farkas József
2016-09-25 10:09:30 +02:00
parent 8c0f202b60
commit 927cc80815
3 changed files with 18 additions and 15 deletions

View File

@@ -4,7 +4,7 @@
[coverages]="module.coverages"
[keyboardKeys]="module.keyboardKeys"
[attr.transform]="module.attributes.transform"
[keyActions]="moduleConfig[i].keyActions.elements"
[keyActions]="moduleConfig[i].keyActions"
(keyClick)="onKeyClick(i, $event)"
(keyHover)="onKeyHover($event.index, $event.event, $event.over, i)"
/>

Before

Width:  |  Height:  |  Size: 662 B

After

Width:  |  Height:  |  Size: 653 B

View File

@@ -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[moduleId].keyActions.elements,
keyActions: this.layers[this.currentLayer].modules[moduleId].keyActions,
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[moduleId].keyActions.elements[keyId];
let keyActionToEdit: KeyAction = this.layers[this.currentLayer].modules[moduleId].keyActions[keyId];
if (this.tooltipEnabled) {
if (over) {