Skip to content

Commit

Permalink
fix paddin gissue on text (#10498)
Browse files Browse the repository at this point in the history
  • Loading branch information
GoodBoyDigital committed Apr 30, 2024
1 parent 7845026 commit caab673
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/scene/text/canvas/CanvasTextSystem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,9 @@ export class CanvasTextSystem implements System

context.scale(resolution, resolution);

context.clearRect(0, 0, measured.width + 4, measured.height + 4);
const padding = style.padding * 2;

context.clearRect(0, 0, measured.width + 4 + padding, measured.height + 4 + padding);

// set stroke styles..

Expand Down

0 comments on commit caab673

Please sign in to comment.