Add KeyboardModule Component
This commit is contained in:
12
src/components/module.model.ts
Normal file
12
src/components/module.model.ts
Normal 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].$;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user