Browse Source
Merge pull request #11169 from ArtemDzhereleiko/AD/bug-fix/gradient/min-max-value
Fixed Min/Max value on gradient panel
pull/11176/head
Igor Kulikov
2 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with
2 additions and
2 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/settings/common/gradient.component.ts
|
|
|
@ -141,8 +141,8 @@ export class GradientComponent implements OnInit, ControlValueAccessor, OnDestro |
|
|
|
writeValue(value: ColorGradientSettings): void { |
|
|
|
if (isDefinedAndNotNull(value)) { |
|
|
|
this.gradientFormGroup.get('advancedMode').patchValue(value.advancedMode, {emitEvent: false}); |
|
|
|
this.gradientFormGroup.get('minValue').patchValue(isFinite(value.minValue) ? value.minValue : this.minValue, {emitEvent: false}); |
|
|
|
this.gradientFormGroup.get('maxValue').patchValue(isFinite(value.maxValue) ? value.maxValue : this.maxValue, {emitEvent: false}); |
|
|
|
this.gradientFormGroup.get('minValue').patchValue(isFinite(this.minValue) ? this.minValue : value.minValue, {emitEvent: false}); |
|
|
|
this.gradientFormGroup.get('maxValue').patchValue(isFinite(this.maxValue) ? this.maxValue : value.maxValue, {emitEvent: false}); |
|
|
|
if (value?.gradient?.length) { |
|
|
|
this.gradientFormGroup.get('gradient').get('start').patchValue(value.gradient[0], {emitEvent: false}); |
|
|
|
this.gradientFormGroup.get('gradient').get('end').patchValue(value.gradient[value.gradient.length - 1], {emitEvent: false}); |
|
|
|
|