Add coverages of modules

This commit is contained in:
József Farkas
2016-04-16 14:50:13 +02:00
parent d5dc8d8d0e
commit c47188b2b2
3 changed files with 5 additions and 4 deletions

View File

@@ -1,14 +1,14 @@
import {KeyboardKey} from './keyboard-key.model';
export class Module {
private case: any;
private coverages: any[];
private keyboardKeys: KeyboardKey[];
private attributes: any;
constructor(obj: { rect: any[], path: any[], $: Object }, fill?: string) {
this.keyboardKeys = obj.rect.map(rect => rect.$);
this.keyboardKeys.forEach(keyboardKey => keyboardKey.fill = fill ? fill : 'black');
this.case = obj.path[0].$;
this.coverages = obj.path;
this.attributes = obj.$;
}
}