Skip to content

Commit d003945

Browse files
committed
v2's PrecalculateWordWrap -> getWrappedText
1 parent 2fe60ff commit d003945

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

  • v3/src/gameobjects/text/static

v3/src/gameobjects/text/static/Text.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -323,6 +323,16 @@ var Text = new Class({
323323

324324
return result;
325325
},
326+
327+
getWrappedText: function (text)
328+
{
329+
if (text === undefined) { text = this.text; }
330+
331+
var wrappedLines = this.runWordWrap(text);
332+
333+
return wrappedLines.split(/(?:\r\n|\r|\n)/);
334+
},
335+
326336
setText: function (value)
327337
{
328338
if (Array.isArray(value))

0 commit comments

Comments
 (0)