Skip to content

Commit 75e9349

Browse files
committed
Text canvas width cannot drop below 1x1 pixels.
1 parent eb3c9fe commit 75e9349

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

src/gameobjects/text/static/Text.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -576,6 +576,9 @@ var Text = new Class({
576576
w *= this.resolution;
577577
h *= this.resolution;
578578

579+
w = Math.max(w, 1);
580+
h = Math.max(h, 1);
581+
579582
if (canvas.width !== w || canvas.height !== h)
580583
{
581584
canvas.width = w;

0 commit comments

Comments
 (0)