mirror of
https://github.com/photonstorm/phaser
synced 2024-11-27 15:12:18 +00:00
v2's PrecalculateWordWrap -> getWrappedText
This commit is contained in:
parent
2fe60ffbf9
commit
d003945a66
1 changed files with 10 additions and 0 deletions
|
@ -323,6 +323,16 @@ var Text = new Class({
|
|||
|
||||
return result;
|
||||
},
|
||||
|
||||
getWrappedText: function (text)
|
||||
{
|
||||
if (text === undefined) { text = this.text; }
|
||||
|
||||
var wrappedLines = this.runWordWrap(text);
|
||||
|
||||
return wrappedLines.split(/(?:\r\n|\r|\n)/);
|
||||
},
|
||||
|
||||
setText: function (value)
|
||||
{
|
||||
if (Array.isArray(value))
|
||||
|
|
Loading…
Reference in a new issue