fix incorrect width property for multi-line BitmapText
BitmapText.updateText() was setting this.width to the width of the last line of multi-line text, rather than that of the longest line. this made it impossible to center multi-line strings. (found working in Phaser)
This commit is contained in:
parent
b6f51b34b0
commit
5d45bbfc4b
1 changed files with 1 additions and 1 deletions
|
@ -135,7 +135,7 @@ PIXI.BitmapText.prototype.updateText = function()
|
|||
this.addChild(c);
|
||||
}
|
||||
|
||||
this.width = pos.x * scale;
|
||||
this.width = maxLineWidth * scale;
|
||||
this.height = (pos.y + data.lineHeight) * scale;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue