update item clips view
This commit is contained in:
parent
3bbb46c98e
commit
885d80dbcc
1 changed files with 5 additions and 3 deletions
|
@ -20,13 +20,15 @@ pandora.ui.item = function() {
|
||||||
} else if (pandora.user.ui.itemView == 'calendar') {
|
} else if (pandora.user.ui.itemView == 'calendar') {
|
||||||
pandora.$ui.contentPanel.replaceElement(1, Ox.Element().html('Calendar'));
|
pandora.$ui.contentPanel.replaceElement(1, Ox.Element().html('Calendar'));
|
||||||
} else if (pandora.user.ui.itemView == 'clips') {
|
} else if (pandora.user.ui.itemView == 'clips') {
|
||||||
|
var ratio = result.data.stream.aspectRatio;
|
||||||
|
Ox.print('RATIO', ratio)
|
||||||
pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.clips = Ox.IconList({
|
pandora.$ui.contentPanel.replaceElement(1, pandora.$ui.clips = Ox.IconList({
|
||||||
|
fixedRatio: ratio,
|
||||||
item: function(data, sort, size) {
|
item: function(data, sort, size) {
|
||||||
size = size || 128;
|
size = size || 128;
|
||||||
var ratio = result.data.stream.aspectRatio,
|
var 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 = '/' + pandora.user.ui.item + '/' + size + 'p' + data['in'] + '.jpg';
|
url = '/' + pandora.user.ui.item + '/' + height + 'p' + data['in'] + '.jpg';
|
||||||
return {
|
return {
|
||||||
height: height,
|
height: height,
|
||||||
id: data['id'],
|
id: data['id'],
|
||||||
|
|
Loading…
Reference in a new issue