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 (++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];
}
}