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