1
0
Fork 0
forked from 0x2620/oxjs

change the signature of Ox.truncate to allow for passing 'position' without having to pass 'padding', change default padding from '...' to a real ellipsis

This commit is contained in:
rolux 2012-06-03 11:07:39 +02:00
commit 9ce126263b
2 changed files with 12 additions and 13 deletions

View file

@ -163,7 +163,7 @@ Ox.IconItem = function(options, self) {
// truncated rest (including the last line) and discard all extra lines
if (lines.length > maxLines) {
lines[maxLines - 1] = Ox.truncate(
lines.slice(maxLines - 1).join(' '), maxLength, '...', 'center'
lines.slice(maxLines - 1).join(' '), 'center', maxLength
);
lines = lines.slice(0, maxLines);
}