support fixed-ratio icon lists
This commit is contained in:
parent
50c2e4fda7
commit
395216cb83
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),
|
width = ratio > 1 ? size : Math.round(size * ratio),
|
||||||
height = ratio > 1 ? Math.round(size / ratio) : size,
|
height = ratio > 1 ? Math.round(size / ratio) : size,
|
||||||
url = '/' + data.item + '/' + height + 'p' + data['in'] + '.jpg';
|
url = '/' + data.item + '/' + height + 'p' + data['in'] + '.jpg';
|
||||||
|
// fixme: ugly
|
||||||
|
if (height > 96) {
|
||||||
|
width = Math.round(width * 96 / height);
|
||||||
|
height = 96;
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
height: height,
|
height: height,
|
||||||
id: data['id'],
|
id: data['id'],
|
||||||
|
|
Loading…
Reference in a new issue