From ab528582b156c340b7b353ebfea8b74b48f90352 Mon Sep 17 00:00:00 2001 From: Janne Julkunen Date: Wed, 7 Jun 2017 14:26:08 +0300 Subject: [PATCH] And actually include all the bug fixes --- src/lib/color-picker.directive.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/lib/color-picker.directive.ts b/src/lib/color-picker.directive.ts index e79eb52..fe852e1 100644 --- a/src/lib/color-picker.directive.ts +++ b/src/lib/color-picker.directive.ts @@ -14,8 +14,8 @@ import { SliderPosition, SliderDimension} from './helpers'; }) export class ColorPickerDirective implements OnInit, OnChanges { @Input('colorPicker') colorPicker: string; - @Output('colorPickerChange') colorPickerChange = new EventEmitter(true); @Output('colorPickerSelect') colorPickerSelect = new EventEmitter(true); + @Output('colorPickerChange') colorPickerChange = new EventEmitter(false); @Input('cpToggle') cpToggle: boolean; @Output('cpInputChange') cpInputChange = new EventEmitter(true); @Output('cpSliderChange') cpSliderChange = new EventEmitter(true); @@ -78,8 +78,10 @@ export class ColorPickerDirective implements OnInit, OnChanges { } let color = this.service.outputFormat(hsva, this.cpOutputFormat, this.cpAlphaChannel === 'hex8'); if (color !== this.colorPicker) { - this.colorPickerChange.emit(color); - this.cdr.detectChanges(); + //setTimeout(() => { + this.colorPickerChange.emit(color); + this.cdr.detectChanges(); + //}, 0); } }