From 4ae9653e66988257e38c767dc2bd654d7fbe67b5 Mon Sep 17 00:00:00 2001 From: Fabian Jeglinski Date: Fri, 10 May 2019 17:47:57 +0200 Subject: [PATCH] refacotr custom color entry component --- .../custom-color-entry.component.html | 2 +- .../custom-color-entry.component.scss | 2 +- .../custom-color-entry.component.ts | 44 ++++++------------- 3 files changed, 15 insertions(+), 33 deletions(-) diff --git a/src/app/feature-management/custom-color-entry/custom-color-entry.component.html b/src/app/feature-management/custom-color-entry/custom-color-entry.component.html index 6d40763..ebea1dc 100644 --- a/src/app/feature-management/custom-color-entry/custom-color-entry.component.html +++ b/src/app/feature-management/custom-color-entry/custom-color-entry.component.html @@ -1,7 +1,7 @@
Color:
- (Default) + (default color)
= new EventEmitter(); /** @@ -95,7 +76,7 @@ export class CustomColorEntryComponent implements OnInit{ 'background-color': this.defaultFillColorAsRgba }; this.isDefaultColor = true; - if (this.strokeColor) { + if (this.selectedColor) { styles = { 'border-color': this.strokeColorAsRgba, 'background-color': this.fillColorAsRgba @@ -118,6 +99,7 @@ export class CustomColorEntryComponent implements OnInit{ resetColor(){ this.colors[CustomProperties.COLOR_STROKE] = null; this.colors[CustomProperties.COLOR_FILL] = null; + this._selectedColor = null; this.definePreviewStyle(); }