From d003945a66f37c4f85fecf5d2e2c760d4ba15fd4 Mon Sep 17 00:00:00 2001 From: Michael Hadley Date: Wed, 13 Dec 2017 15:09:06 -0600 Subject: [PATCH] v2's PrecalculateWordWrap -> getWrappedText --- v3/src/gameobjects/text/static/Text.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/v3/src/gameobjects/text/static/Text.js b/v3/src/gameobjects/text/static/Text.js index 376bf4a26..38a7b004c 100644 --- a/v3/src/gameobjects/text/static/Text.js +++ b/v3/src/gameobjects/text/static/Text.js @@ -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))