Move the fill of keys to the root

This commit is contained in:
József Farkas
2016-04-16 14:57:06 +02:00
parent c47188b2b2
commit d9360b2fb7
5 changed files with 6 additions and 9 deletions

View File

@@ -5,9 +5,8 @@ export class Module {
private keyboardKeys: KeyboardKey[];
private attributes: any;
constructor(obj: { rect: any[], path: any[], $: Object }, fill?: string) {
constructor(obj: { rect: any[], path: any[], $: Object }) {
this.keyboardKeys = obj.rect.map(rect => rect.$);
this.keyboardKeys.forEach(keyboardKey => keyboardKey.fill = fill ? fill : 'black');
this.coverages = obj.path;
this.attributes = obj.$;
}