From 1bde96af3c50bc55793c6319ee5fcd1cf219728f Mon Sep 17 00:00:00 2001 From: j <0x006A@0x2620.org> Date: Tue, 18 Feb 2014 08:44:30 +0000 Subject: [PATCH] dont trigger videopointsEvent on inactive elements, fixes #2324 --- static/js/info.js | 7 +++---- static/js/item.js | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/static/js/info.js b/static/js/info.js index af1ef636..1195b8df 100644 --- a/static/js/info.js +++ b/static/js/info.js @@ -114,15 +114,14 @@ pandora.ui.info = function() { }) .bindEvent({ click: function(data) { - pandora.UI.set( - 'videoPoints.' + id + '.position', - data.position - ); if (ui.item && ['timeline', 'player', 'editor'].indexOf(ui.itemView) > -1) { pandora.$ui[ui.itemView].options({ position: data.position }); } else { + pandora.UI.set('videoPoints.' + id, { + 'in': 0, out: 0, position: data.position + }); pandora.UI.set({ item: id, itemView: ui.videoView diff --git a/static/js/item.js b/static/js/item.js index 2e366316..212f6ce0 100644 --- a/static/js/item.js +++ b/static/js/item.js @@ -140,7 +140,7 @@ pandora.ui.item = function() { videopointsEvent, function(data, event, element) { var options = {}; - if (event == videopointsEvent) { + if (pandora.user.ui.item && event == videopointsEvent) { //Ox.print('DATA.VALUE', JSON.stringify(data.value)); if (data && data.value && data.value.annotation) { options.selected = pandora.user.ui.item + '/' + data.value.annotation;