From 82c15bb1380f44ddff3e7abfd1d8bb26c49dc195 Mon Sep 17 00:00:00 2001 From: rolux Date: Thu, 6 Feb 2014 08:52:02 +0000 Subject: [PATCH] map/calendar with clips: resize sort element depending on width --- static/js/navigationView.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/static/js/navigationView.js b/static/js/navigationView.js index c2b665cb..16a7f7d6 100644 --- a/static/js/navigationView.js +++ b/static/js/navigationView.js @@ -63,7 +63,8 @@ pandora.ui.navigationView = function(type, videoRatio) { orientation: 'vertical' }) .bindEvent({ - resize: function() { + resize: function(data) { + pandora.$ui.sortElement.resizeElement(getSortSelectWidth(data.size)); $list.size() }, resizeend: function(data) { @@ -76,6 +77,7 @@ pandora.ui.navigationView = function(type, videoRatio) { } else { size = listSizes[2]; } + pandora.$ui.sortElement.resizeElement(getSortSelectWidth(size)); that.size(1, size, function() { // strangely, the animation may still not be fully // finished, causing the list size to be off by one @@ -247,6 +249,10 @@ pandora.ui.navigationView = function(type, videoRatio) { } } + function getSortSelectWidth(width) { + return Math.min(144, width - 32 + Ox.UI.SCROLLBAR_SIZE); + } + function updateStatusbar(items) { $status.html(Ox.toTitleCase(Ox.formatCount(items, 'clip'))); }