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:
parent
3ec610076a
commit
9ce126263b
2 changed files with 12 additions and 13 deletions
|
|
@ -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);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue