dont trigger videopointsEvent on inactive elements, fixes #2324

This commit is contained in:
j 2014-02-18 08:44:30 +00:00
parent 24ead6ffd3
commit 1bde96af3c
2 changed files with 4 additions and 5 deletions

View file

@ -114,15 +114,14 @@ pandora.ui.info = function() {
}) })
.bindEvent({ .bindEvent({
click: function(data) { click: function(data) {
pandora.UI.set(
'videoPoints.' + id + '.position',
data.position
);
if (ui.item && ['timeline', 'player', 'editor'].indexOf(ui.itemView) > -1) { if (ui.item && ['timeline', 'player', 'editor'].indexOf(ui.itemView) > -1) {
pandora.$ui[ui.itemView].options({ pandora.$ui[ui.itemView].options({
position: data.position position: data.position
}); });
} else { } else {
pandora.UI.set('videoPoints.' + id, {
'in': 0, out: 0, position: data.position
});
pandora.UI.set({ pandora.UI.set({
item: id, item: id,
itemView: ui.videoView itemView: ui.videoView

View file

@ -140,7 +140,7 @@ pandora.ui.item = function() {
videopointsEvent, videopointsEvent,
function(data, event, element) { function(data, event, element) {
var options = {}; var options = {};
if (event == videopointsEvent) { if (pandora.user.ui.item && event == videopointsEvent) {
//Ox.print('DATA.VALUE', JSON.stringify(data.value)); //Ox.print('DATA.VALUE', JSON.stringify(data.value));
if (data && data.value && data.value.annotation) { if (data && data.value && data.value.annotation) {
options.selected = pandora.user.ui.item + '/' + data.value.annotation; options.selected = pandora.user.ui.item + '/' + data.value.annotation;