forked from 0x2620/pandora
fix a folder resize bug
This commit is contained in:
parent
aa36bc339b
commit
74e9e3ee8c
1 changed files with 14 additions and 9 deletions
|
@ -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;
|
||||||
pandora.user.ui.listSelection.length && !pandora.isClipView()
|
if (pandora.user.ui.showInfo || includeHidden) {
|
||||||
);
|
isVideoPreview = pandora.user.ui.item || (
|
||||||
return (pandora.user.ui.showInfo || includeHidden) * Math.min(
|
pandora.user.ui.listSelection.length && !pandora.isClipView()
|
||||||
isVideoPreview
|
);
|
||||||
? Math.round(pandora.user.ui.sidebarSize / (16/9)) + 16
|
height = Math.min(
|
||||||
: pandora.user.ui.sidebarSize,
|
isVideoPreview
|
||||||
window.innerHeight - 109 // 20 menu + 24 bar + 64 (4 closed folders) + 1 resizebar
|
? Math.round(pandora.user.ui.sidebarSize / (16/9)) + 16
|
||||||
);
|
: pandora.user.ui.sidebarSize,
|
||||||
|
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) {
|
||||||
|
|
Loading…
Reference in a new issue