We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 5af9cca + d2a8cbb commit a74b092Copy full SHA for a74b092
src/core/text-rendering/renderers/LightningTextTextureRenderer.ts
@@ -399,6 +399,16 @@ export class LightningTextTextureRenderer {
399
innerWidth = maxLineWidth;
400
}
401
402
+ // If word wrap is enabled the width needs to be the width of the text.
403
+ if (
404
+ this._settings.wordWrap &&
405
+ w > maxLineWidth &&
406
+ this._settings.textAlign === 'left' &&
407
+ lines.length === 1
408
+ ) {
409
+ width = maxLineWidth + paddingLeft + paddingRight;
410
+ }
411
+
412
let height;
413
if (h) {
414
height = h;
0 commit comments