support fixed-ratio icon lists

This commit is contained in:
rolux 2011-08-07 02:32:48 +00:00
parent 50c2e4fda7
commit 395216cb83

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