Skip to content

Commit

Permalink
Merge pull request #9860 from ArtemDzhereleiko/AD/bug-fix/analog-gaug…
Browse files Browse the repository at this point in the history
…e/major-ticks

Fixed analog gauge infinite loop for major ticks
  • Loading branch information
ashvayka authored Dec 18, 2023
2 parents 1419782 + 657649f commit f799194
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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[] = [];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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, []],
Expand Down

0 comments on commit f799194

Please sign in to comment.