From cd298c24863ed9380aed27cae48ba6a7d04c49ed Mon Sep 17 00:00:00 2001 From: rlx <0x0073@0x2620.org> Date: Sun, 7 Aug 2011 02:32:48 +0000 Subject: [PATCH] support fixed-ratio icon lists --- static/js/pandora/ui/list.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/pandora/ui/list.js b/static/js/pandora/ui/list.js index a2a93c7..48fdba8 100644 --- a/static/js/pandora/ui/list.js +++ b/static/js/pandora/ui/list.js @@ -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'],