diff --git a/src/components/keyboard-key.component.ts b/src/components/keyboard-key.component.ts index efc03b2a..a2e6aad2 100644 --- a/src/components/keyboard-key.component.ts +++ b/src/components/keyboard-key.component.ts @@ -16,7 +16,6 @@ export class KeyboardKeyComponent implements OnInit { @Input() ry: string; @Input() height: string; @Input() width: string; - @Input() fill: string; constructor() { } diff --git a/src/components/keyboard-key.model.ts b/src/components/keyboard-key.model.ts index c4e45ab0..74321cd2 100644 --- a/src/components/keyboard-key.model.ts +++ b/src/components/keyboard-key.model.ts @@ -6,5 +6,4 @@ export interface KeyboardKey { ry: string; height: string; width: string; - fill: string; } diff --git a/src/components/keyboard.component.ts b/src/components/keyboard.component.ts index d79c729e..6b802c13 100644 --- a/src/components/keyboard.component.ts +++ b/src/components/keyboard.component.ts @@ -8,11 +8,10 @@ import {Module, ModuleComponent} from './module'; template: ` - + @@ -33,6 +32,7 @@ export class KeyboardComponent implements OnInit { private modules: Module[]; private svg: any; private transform: string; + private fill: string; constructor(private dps: DataProviderService) { this.modules = []; @@ -42,7 +42,8 @@ export class KeyboardComponent implements OnInit { this.svg = this.dps.getBaseLayer(); this.viewBox = this.svg.$.viewBox; this.transform = this.svg.g[0].$.transform; - this.modules = this.svg.g[0].g.map(obj => new Module(obj, this.svg.g[0].$.fill)); + this.fill = this.svg.g[0].$.fill; + this.modules = this.svg.g[0].g.map(obj => new Module(obj)); } } diff --git a/src/components/module.component.ts b/src/components/module.component.ts index 526c0fc1..d22409ef 100644 --- a/src/components/module.component.ts +++ b/src/components/module.component.ts @@ -9,7 +9,7 @@ import {KeyboardKeyComponent} from './keyboard-key.component'; ` rect.$); - this.keyboardKeys.forEach(keyboardKey => keyboardKey.fill = fill ? fill : 'black'); this.coverages = obj.path; this.attributes = obj.$; }