From cd845c08f27a44092389af18a9753f328f46b622 Mon Sep 17 00:00:00 2001 From: Matt Gilman Date: Fri, 10 Apr 2015 12:34:52 -0400 Subject: [PATCH] NIFI-508: - Fixing the ordering of words when the text wraps.. --- .../src/main/webapp/js/nf/canvas/nf-canvas-utils.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js index f1cb458fb1..4c6be57d44 100644 --- a/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js +++ b/nifi/nifi-nar-bundles/nifi-framework-bundle/nifi-framework/nifi-web/nifi-web-ui/src/main/webapp/js/nf/canvas/nf-canvas-utils.js @@ -311,8 +311,9 @@ nf.CanvasUtils = (function () { // if we've reached the last line, use single line ellipsis if (++i >= lineCount) { - // restore the current word - var remainder = [word].concat(words); + // get the remainder using the current word and + // reversing whats left + var remainder = [word].concat(words.reverse()); // apply ellipsis to the last line nf.CanvasUtils.ellipsis(tspan, remainder.join(' ')); @@ -322,7 +323,7 @@ nf.CanvasUtils = (function () { } else { tspan.text(word); - // other prep the line for the next iteration + // prep the line for the next iteration line = [word]; } }