implement 'follow player while playing'

This commit is contained in:
rolux 2012-04-17 13:43:14 +00:00
parent 363ff25bb7
commit 2e09efbe53
2 changed files with 9 additions and 8 deletions

View file

@ -107,13 +107,6 @@ pandora.ui.browser = function() {
open: function() { open: function() {
that.scrollToSelection(); that.scrollToSelection();
}, },
resize: function(data) {
if (pandora.user.ui.itemView == 'map') {
pandora.ui.$map.resizeMap();
} else if (pandora.user.ui.itemView == 'calendar') {
pandora.ui.$calendar.resizeCalendar();
}
},
select: function(data) { select: function(data) {
data.ids.length && pandora.UI.set({ data.ids.length && pandora.UI.set({
'item': data.ids[0] 'item': data.ids[0]
@ -122,11 +115,16 @@ pandora.ui.browser = function() {
toggle: function(data) { toggle: function(data) {
pandora.UI.set({showBrowser: !data.collapsed}); pandora.UI.set({showBrowser: !data.collapsed});
if (data.collapsed) { if (data.collapsed) {
// fixme: can we do this for timeline and player too?
if (pandora.user.ui.itemView == 'editor') { if (pandora.user.ui.itemView == 'editor') {
pandora.$ui.editor.gainFocus(); pandora.$ui.editor.gainFocus();
} }
} }
if (pandora.user.ui.itemView == 'map') { if (pandora.user.ui.itemView == 'timeline') {
pandora.$ui.timeline.options({
height: pandora.$ui.contentPanel.size(1)
});
} else if (pandora.user.ui.itemView == 'map') {
pandora.$ui.map.resizeMap(); pandora.$ui.map.resizeMap();
} else if (pandora.user.ui.itemView == 'calendar') { } else if (pandora.user.ui.itemView == 'calendar') {
pandora.$ui.calendar.resizeCalendar(); pandora.$ui.calendar.resizeCalendar();

View file

@ -58,6 +58,9 @@ pandora.ui.timeline = function(data) {
annotationssort: function(data) { annotationssort: function(data) {
pandora.UI.set({annotationsSort: data.sort}); pandora.UI.set({annotationsSort: data.sort});
}, },
follow: function(data) {
pandora.UI.set('followPlayer', data.follow);
},
muted: function(data) { muted: function(data) {
pandora.UI.set('videoMuted', data.muted); pandora.UI.set('videoMuted', data.muted);
}, },