support fixed-ratio icon lists
This commit is contained in:
parent
4760516c0a
commit
cd298c2486
1 changed files with 5 additions and 0 deletions
|
@ -119,6 +119,11 @@ pandora.ui.list = function(view) { // fixme: remove view argument
|
|||
width = ratio > 1 ? size : Math.round(size * ratio),
|
||||
height = ratio > 1 ? Math.round(size / ratio) : size,
|
||||
url = '/' + data.item + '/' + height + 'p' + data['in'] + '.jpg';
|
||||
// fixme: ugly
|
||||
if (height > 96) {
|
||||
width = Math.round(width * 96 / height);
|
||||
height = 96;
|
||||
}
|
||||
return {
|
||||
height: height,
|
||||
id: data['id'],
|
||||
|
|
Loading…
Reference in a new issue