mirror of
https://github.com/photonstorm/phaser
synced 2024-11-23 21:24:09 +00:00
Add missing assignations required for wrapping calculations to work
correctly
This commit is contained in:
parent
ef7c2c6275
commit
5cc6b5962b
1 changed files with 2 additions and 0 deletions
|
@ -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)/);
|
||||
};
|
||||
|
|
Loading…
Reference in a new issue