Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/graphic/Text.ts
Original file line number Diff line number Diff line change
Expand Up @@ -810,7 +810,7 @@ class ZRText extends Displayable<TextProps> {

let rectEl: Rect;
let imgEl: ZRImage;
if (isPlainOrGradientBg || (textBorderWidth && textBorderColor)) {
if (isPlainOrGradientBg || style.lineHeight || (textBorderWidth && textBorderColor)) {
// Background is color
rectEl = this._getOrCreateChild(Rect);
rectEl.useStyle(rectEl.createStyle()); // Create an empty style.
Expand Down Expand Up @@ -985,6 +985,7 @@ function getStyleText(style: TextStylePropsPart): string {
function needDrawBackground(style: TextStylePropsPart): boolean {
return !!(
style.backgroundColor
|| style.lineHeight
|| (style.borderWidth && style.borderColor)
);
}
Expand Down