dont fail adding new annotations while editing an annotation, dont set in/out on 'find again' while editing annotation

This commit is contained in:
j 2014-02-13 06:16:09 +00:00
parent a5ed8ed8ed
commit e8d4961db6

View file

@ -896,6 +896,11 @@ Ox.VideoAnnotationPanel = function(options, self) {
});
function addAnnotation(layer) {
if (self.editing) {
self.editing = false;
setTimelineState();
self.$annotationPanel.blurItem();
}
that.triggerEvent('addannotation', {
'in': self.options['in'],
layer: layer,
@ -1219,13 +1224,17 @@ Ox.VideoAnnotationPanel = function(options, self) {
// if annotationsRange is 'position',
// this may cause a deselect
}
setPoint('in', data['in'], true);
setPoint('out', data.out, true);
if (!self.editing) {
setPoint('in', data['in'], true);
setPoint('out', data.out, true);
}
}
if (!self.editing) {
self.options.selected = data.id;
self.$annotationPanel.options({selected: self.options.selected});
setTimelineState();
that.triggerEvent('select', {id: self.options.selected});
}
self.options.selected = data.id;
self.$annotationPanel.options({selected: self.options.selected});
setTimelineState();
that.triggerEvent('select', {id: self.options.selected});
}
function selectCut() {