Add KeyboardModule Component

This commit is contained in:
József Farkas
2016-04-09 21:58:50 +02:00
parent f8bcf2ef94
commit 4ccf06efc5
3 changed files with 71 additions and 0 deletions

View File

@@ -0,0 +1,12 @@
import {KeyboardButton} from './keyboard-button.model';
export class Module {
private case: any;
private keyboardButtons: KeyboardButton[];
constructor(obj: { rect: any[], path: any[] }, fill?: string) {
this.keyboardButtons = obj.rect.map(obj => obj.$);
this.keyboardButtons.forEach(keyboardButton => keyboardButton.fill = fill ? fill : 'black');
this.case = obj.path[0].$;
}
}