resize map on window and browser resize

This commit is contained in:
rolux 2011-10-03 00:08:00 +00:00
parent 18810602fb
commit 6810af3164
2 changed files with 43 additions and 31 deletions

View file

@ -180,35 +180,36 @@ Ox.load({
pandora.$ui.leftPanel.size(2, pandora.getInfoHeight());
pandora.$ui.info.resizeInfo();
if (!pandora.user.ui.item) {
pandora.$ui.list.size();
pandora.resizeGroups(pandora.$ui.rightPanel.width());
if (!pandora.user.ui.item) {
if (pandora.user.ui.listView == 'map') {
pandora.$ui.map.resize();
pandora.$ui.map.resizeMap();
} else if (pandora.user.ui.listView == 'calendar') {
// ...
} else {
pandora.$ui.list.size();
}
// ...
} else {
if (pandora.user.ui.itemView == 'map') {
pandora.$ui.map.resize();
}
// ...
}
} else {
//Ox.print('pandora.$ui.window.resize');
pandora.$ui.browser.scrollToSelection();
pandora.user.ui.itemView == 'info' && pandora.$ui.item.resize();
pandora.user.ui.itemView == 'video' && pandora.$ui.player.options({
if (pandora.user.ui.itemView == 'info') {
pandora.$ui.info.resize();
} else if (pandora.user.ui.itemView == 'video') {
pandora.$ui.player.options({
// fixme: duplicated
height: pandora.$ui.contentPanel.size(1),
width: pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1
});
pandora.user.ui.itemView == 'timeline' && pandora.$ui.editor.options({
} else if (pandora.user.ui.itemView == 'timeline') {
pandora.$ui.editor.options({
// fixme: duplicated
height: pandora.$ui.contentPanel.size(1),
width: pandora.$ui.document.width() - pandora.$ui.mainPanel.size(0) - 1
});
} else if (pandora.user.ui.itemView == 'map') {
pandora.$ui.map.resizeMap();
} else if (pandora.user.ui.itemView == 'calendar') {
// ...
}
}
}

View file

@ -26,15 +26,9 @@ pandora.ui.browser = function() {
pandora.$ui.groups.forEach(function(list) {
list.size();
});
if (!pandora.user.ui.item) {
if (pandora.user.ui.listView == 'map') {
pandora.$ui.map.resize();
}
// ...
} else {
if (pandora.user.ui.itemView == 'map') {
pandora.$ui.map.resize();
}
pandora.$ui.map.resizeMap();
} else if (pandora.user.ui.listView == 'calendar') {
// ...
}
},
@ -44,6 +38,11 @@ pandora.ui.browser = function() {
toggle: function(data) {
data.collapsed && pandora.$ui.list.gainFocus();
pandora.UI.set({showGroups: !data.collapsed});
if (pandora.user.ui.listView == 'map') {
pandora.$ui.map.resizeMap();
} else if (pandora.user.ui.listView == 'calendar') {
// ...
}
}
});
} else {
@ -88,6 +87,13 @@ pandora.ui.browser = function() {
open: function() {
that.scrollToSelection();
},
resize: function(data) {
if (pandora.user.ui.itemView == 'map') {
pandora.ui.$map.resizeMap();
} else if (pandora.user.ui.itemView == 'calendar') {
// ...
}
},
select: function(data) {
pandora.UI.set({
'item': data.ids[0]
@ -100,6 +106,11 @@ pandora.ui.browser = function() {
pandora.$ui.editor.gainFocus();
}
}
if (pandora.user.ui.itemView == 'map') {
pandora.ui.$map.resizeMap();
} else if (pandora.user.ui.itemView == 'calendar') {
// ...
}
},
pandora_icons: function(data) {
that.options({