support fixed-ratio icon lists

This commit is contained in:
rlx 2011-08-07 02:32:48 +00:00
parent 4760516c0a
commit cd298c2486
1 changed files with 5 additions and 0 deletions

View File

@ -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'],