refactor: Keymap

This commit is contained in:
Farkas József
2016-09-25 14:10:30 +02:00
parent b78ce778a6
commit 7ba0a0401a
3 changed files with 9 additions and 9 deletions

View File

@@ -12,6 +12,6 @@
<img src="./images/base-layer--blank.svg">
</div>
<svg-keyboard *ngIf="selectedKeymap?.abbreviation"
[moduleConfig]="selectedKeymap.layers.elements[0].modules.elements">
[moduleConfig]="selectedKeymap.layers[0].modules.elements">
</svg-keyboard>
</div>

View File

@@ -117,7 +117,7 @@ export class SvgKeyboardWrapComponent implements OnChanges {
ngOnChanges(changes: SimpleChanges) {
if (changes['keymap'].previousValue.abbreviation !== changes['keymap'].currentValue.abbreviation) {
this.layers = this.keymap.layers.elements;
this.layers = this.keymap.layers;
this.currentLayer = 0;
if (this.layers.length > 0) {