BarGauge: Fixed width of unfilled region not being correct when value is close to 100% (#26193)

* BarGauge: Fixed width of unfilled region not being correct when value is close to 100%

* removed accidental change

* updated snapshot
This commit is contained in:
Torkel Ödegaard
2020-07-13 12:53:59 +02:00
committed by GitHub
parent 95bf064776
commit b1e48f429f
2 changed files with 1 additions and 4 deletions

View File

@@ -605,9 +605,6 @@ function getValueStyles(
styles.paddingRight = `${VALUE_LEFT_PADDING}px`;
// Need to remove the left padding from the text width constraints
textWidth -= VALUE_LEFT_PADDING;
// adjust width of title box
styles.width = measureText(formattedValueString, styles.fontSize).width + VALUE_LEFT_PADDING * 2;
}
return styles;

View File

@@ -35,7 +35,7 @@ exports[`BarGauge Render with basic options should render 1`] = `
"lineHeight": 1,
"paddingLeft": "10px",
"paddingRight": "10px",
"width": 22,
"width": "60px",
}
}
value={