fix a folder resize bug

This commit is contained in:
rolux 2011-11-02 19:11:00 +00:00
parent aa36bc339b
commit 74e9e3ee8c

View file

@ -468,6 +468,7 @@ pandora.getFoldersHeight = function() {
pandora.getFoldersWidth = function() { pandora.getFoldersWidth = function() {
var width = pandora.user.ui.sidebarSize; var width = pandora.user.ui.sidebarSize;
Ox.print('FOLDERS HEIGHT', pandora.getFoldersHeight(), 'INFO HEIGHT', pandora.getInfoHeight())
if ( if (
pandora.$ui.appPanel pandora.$ui.appPanel
&& pandora.getFoldersHeight() > window.innerHeight - 20 - 24 - 1 - pandora.getInfoHeight() && pandora.getFoldersHeight() > window.innerHeight - 20 - 24 - 1 - pandora.getInfoHeight()
@ -485,15 +486,19 @@ pandora.getGroupsSizes = function() {
pandora.getInfoHeight = function(includeHidden) { pandora.getInfoHeight = function(includeHidden) {
// fixme: new, check if it can be used more // fixme: new, check if it can be used more
var isVideoPreview = pandora.user.ui.item || ( var height = 0, isVideoPreview;
if (pandora.user.ui.showInfo || includeHidden) {
isVideoPreview = pandora.user.ui.item || (
pandora.user.ui.listSelection.length && !pandora.isClipView() pandora.user.ui.listSelection.length && !pandora.isClipView()
); );
return (pandora.user.ui.showInfo || includeHidden) * Math.min( height = Math.min(
isVideoPreview isVideoPreview
? Math.round(pandora.user.ui.sidebarSize / (16/9)) + 16 ? Math.round(pandora.user.ui.sidebarSize / (16/9)) + 16
: pandora.user.ui.sidebarSize, : pandora.user.ui.sidebarSize,
window.innerHeight - 109 // 20 menu + 24 bar + 64 (4 closed folders) + 1 resizebar window.innerHeight - 109 // 20 menu + 24 bar + 64 (4 closed folders) + 1 resizebar
); );
}
return height;
} }
pandora.getItemByIdOrTitle = function(str, callback) { pandora.getItemByIdOrTitle = function(str, callback) {