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:
josh shepard 2013-12-01 19:41:49 -08:00 committed by Chad Engler
parent b6f51b34b0
commit 5d45bbfc4b

View file

@ -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;
};