Add coverages of modules
This commit is contained in:
@@ -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.$;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user