Minor fix/polish to gauge panel and threshold editor

(cherry picked from commit b4627ec302)
This commit is contained in:
Torkel Ödegaard
2019-02-25 10:38:23 +01:00
committed by Leonard Gram
parent f93cd857cb
commit 9c2adc115c
2 changed files with 3 additions and 3 deletions
@@ -115,9 +115,9 @@ export class Gauge extends PureComponent<Props> {
getFontScale(length: number): number {
if (length > 12) {
return FONT_SCALE - (length * 5) / 120;
return FONT_SCALE - (length * 5) / 110;
}
return FONT_SCALE - (length * 5) / 105;
return FONT_SCALE - (length * 5) / 100;
}
draw() {
@@ -55,7 +55,7 @@ export class ThresholdsEditor extends PureComponent<Props, State> {
const value = afterThresholdValue - (afterThresholdValue - beforeThresholdValue) / 2;
// Set a color
const color = colors.filter(c => !newThresholds.some(t => t.color === c))[0];
const color = colors.filter(c => !newThresholds.some(t => t.color === c))[1];
this.setState(
{