Skip to content

Commit

Permalink
0.8.11: Hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
rafern committed Apr 3, 2024
1 parent 8e4bde5 commit f5d675d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "lazy-widgets",
"version": "0.8.10",
"version": "0.8.11",
"description": "Typescript retained mode GUI for the HTML canvas API",
"main": "dist/index.js",
"module": "dist/index.js",
Expand Down
8 changes: 8 additions & 0 deletions src/widgets/BaseLabel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,14 @@ export abstract class BaseLabel extends Widget {
this.idealHeight = Math.max(Math.min(this.textHelper.height + this.textHelper.actualLineSpacing, maxHeight), minHeight);
}

override finalizeBounds(): void {
super.finalizeBounds();
this.textHelper.maxWidth = this.width;
// XXX we don't want maxWidth to propagate damage; only if it actually
// changes the text dimensions
this.textHelper.cleanDirtyFlag();
}

protected override handlePainting(_dirtyRects: Array<Rect>): void {
// Start clipping if text wrapping is disabled or the text vertically
// overflows
Expand Down

0 comments on commit f5d675d

Please sign in to comment.