NIFI-508:

- Fixing the ordering of words when the text wraps..
This commit is contained in:
Matt Gilman 2015-04-10 12:34:52 -04:00
parent 9299355ae9
commit cd845c08f2
1 changed files with 4 additions and 3 deletions

View File

@ -311,8 +311,9 @@ nf.CanvasUtils = (function () {
// if we've reached the last line, use single line ellipsis // if we've reached the last line, use single line ellipsis
if (++i >= lineCount) { if (++i >= lineCount) {
// restore the current word // get the remainder using the current word and
var remainder = [word].concat(words); // reversing whats left
var remainder = [word].concat(words.reverse());
// apply ellipsis to the last line // apply ellipsis to the last line
nf.CanvasUtils.ellipsis(tspan, remainder.join(' ')); nf.CanvasUtils.ellipsis(tspan, remainder.join(' '));
@ -322,7 +323,7 @@ nf.CanvasUtils = (function () {
} else { } else {
tspan.text(word); tspan.text(word);
// other prep the line for the next iteration // prep the line for the next iteration
line = [word]; line = [word];
} }
} }