Add missing assignations required for wrapping calculations to work

correctly
This commit is contained in:
slash 2016-01-03 16:54:27 -05:00
parent ef7c2c6275
commit 5cc6b5962b

View file

@ -815,6 +815,8 @@ Phaser.Text.prototype.addFontWeight = function (weight, position) {
* @return {array} An array of strings with the pieces of wrapped text.
*/
Phaser.Text.prototype.precalculateWordWrap = function (text) {
this.texture.baseTexture.resolution = this._res;
this.context.font = this.style.font;
var wrappedLines = this.runWordWrap(text);
return wrappedLines.split(/(?:\r\n|\r|\n)/);
};