mirror of
https://github.com/photonstorm/phaser
synced 2025-02-16 14:08:28 +00:00
Fixed line wrapping issue for lines ending with a space
This commit is contained in:
parent
3835ed417a
commit
6fd0769915
1 changed files with 6 additions and 0 deletions
|
@ -206,6 +206,7 @@ var GetBitmapTextSize = function (src, round, updateOrigin, out)
|
|||
var prev;
|
||||
var offset = 0;
|
||||
var crs = [];
|
||||
var currentY = words.length ? words[0].y : 0;
|
||||
|
||||
for (i = 0; i < words.length; i++)
|
||||
{
|
||||
|
@ -248,6 +249,11 @@ var GetBitmapTextSize = function (src, round, updateOrigin, out)
|
|||
offset = 0;
|
||||
prev = null;
|
||||
}
|
||||
else if (entry.y > currentY)
|
||||
{
|
||||
offset = 0;
|
||||
currentY = entry.y;
|
||||
}
|
||||
}
|
||||
|
||||
var stringInsert = function (str, index, value)
|
||||
|
|
Loading…
Add table
Reference in a new issue