mirror of
https://github.com/photonstorm/phaser
synced 2024-11-21 20:23:19 +00:00
Fix bug
This commit is contained in:
parent
03ce4cecad
commit
cbca9ecf1f
1 changed files with 4 additions and 1 deletions
|
@ -53,7 +53,10 @@ var GetTextSize = function (text, size, lines)
|
|||
lineWidth += context.measureText(line[j]).width;
|
||||
}
|
||||
|
||||
lineWidth += letterSpacing * (line.length - 1);
|
||||
if (line.length > 1)
|
||||
{
|
||||
lineWidth += letterSpacing * (line.length - 1);
|
||||
}
|
||||
}
|
||||
|
||||
// Adjust for wrapped text
|
||||
|
|
Loading…
Reference in a new issue