Browse Source
Merge pull request #9860 from ArtemDzhereleiko/AD/bug-fix/analog-gauge/major-ticks
Fixed analog gauge infinite loop for major ticks
pull/9861/head
Andrew Shvayka
3 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with
2 additions and
2 deletions
-
ui-ngx/src/app/modules/home/components/widget/lib/analogue-gauge.models.ts
-
ui-ngx/src/app/modules/home/components/widget/lib/settings/gauge/analogue-gauge-widget-settings.component.ts
|
|
|
@ -130,7 +130,7 @@ export abstract class TbAnalogueGauge<S extends AnalogueGaugeSettings, O extends |
|
|
|
|
|
|
|
const valueDec = getValueDec(this.ctx, settings); |
|
|
|
|
|
|
|
step = parseFloat(parseFloat(step + '').toFixed(valueDec)); |
|
|
|
step = parseFloat(parseFloat(step + '').toFixed(valueDec)) || 1; |
|
|
|
|
|
|
|
const majorTicks: number[] = []; |
|
|
|
const highlights: Highlight[] = []; |
|
|
|
|
|
|
|
@ -114,7 +114,7 @@ export class AnalogueGaugeWidgetSettingsComponent extends WidgetSettingsComponen |
|
|
|
maxValue: [settings.maxValue, []], |
|
|
|
majorTicksCount: [settings.majorTicksCount, [Validators.min(0)]], |
|
|
|
colorMajorTicks: [settings.colorMajorTicks, []], |
|
|
|
minorTicks: [settings.majorTicksCount, [Validators.min(0)]], |
|
|
|
minorTicks: [settings.minorTicks, [Validators.min(0)]], |
|
|
|
colorMinorTicks: [settings.colorMinorTicks, []], |
|
|
|
numbersFont: [settings.numbersFont, []], |
|
|
|
numbersColor: [settings.numbersFont.color, []], |
|
|
|
|