diff --git a/static/js/pandora/info.js b/static/js/pandora/info.js index 90132738d..2af4dee0d 100644 --- a/static/js/pandora/info.js +++ b/static/js/pandora/info.js @@ -81,6 +81,9 @@ pandora.ui.info = function() { frameRatio: result.data.videoRatio, height: pandora.getInfoHeight(true), id: id, + position: !ui.item && ui.listView == 'timelines' + ? (ui.videoPoints[id] ? ui.videoPoints[id].position : 0) + : void 0, width: ui.sidebarSize }) .bindEvent({ @@ -286,6 +289,7 @@ pandora.ui.listInfo = function() { borderRadius: Math.round(size / 4) + 'px' }; } + that.resizeInfo = function() { var width = that.width(); $icon.css(getIconCSS()); @@ -297,7 +301,9 @@ pandora.ui.listInfo = function() { width: width }); }; + return that; + }; pandora.ui.posterInfo = function(data) { diff --git a/static/js/pandora/list.js b/static/js/pandora/list.js index e896db22e..52c8bfa5e 100644 --- a/static/js/pandora/list.js +++ b/static/js/pandora/list.js @@ -292,16 +292,16 @@ pandora.ui.list = function() { element: Ox.BlockVideoTimeline, events: { position: function(event) { - // FIXME: we need a way to set the position - // once the video preview has loaded - pandora.$ui.videoPreview && pandora.$ui.videoPreview.options({ - position: event.position - }); if (pandora.user.ui.videoPoints[data.id]) { pandora.UI.set('videoPoints.' + data.id + '.position', event.position); } else { pandora.UI.set('videoPoints.' + data.id, {'in': 0, out: 0, position: event.position}); } + // FIXME: we need a way to set the position + // once the video preview has loaded + pandora.$ui.videoPreview && pandora.$ui.videoPreview.options({ + position: event.position + }); } }, id: data.id,