diff --git a/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js b/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js index 0f1a33c9a..e438b066f 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextCanvasRenderer.js @@ -68,11 +68,14 @@ var BitmapTextCanvasRenderer = function (renderer, src, interpolationPercentage, var lineOffsetX = 0; // Update the bounds - skipped internally if not dirty - src.getTextBounds(false); + var bounds = src.getTextBounds(false); // In case the method above changed it (word wrapping) - text = src._text; - textLength = text.length; + if (src.maxWidth > 0) + { + text = bounds.wrappedText; + textLength = text.length; + } var lineData = src._bounds.lines; diff --git a/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js b/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js index ee4247249..cc52ec01d 100644 --- a/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js +++ b/src/gameobjects/bitmaptext/static/BitmapTextWebGLRenderer.js @@ -101,11 +101,14 @@ var BitmapTextWebGLRenderer = function (renderer, src, interpolationPercentage, var lineOffsetX = 0; // Update the bounds - skipped internally if not dirty - src.getTextBounds(false); + var bounds = src.getTextBounds(false); // In case the method above changed it (word wrapping) - text = src._text; - textLength = text.length; + if (src.maxWidth > 0) + { + text = bounds.wrappedText; + textLength = text.length; + } var lineData = src._bounds.lines;