diff --git a/source/Ox.UI/js/Video/VideoAnnotationPanel.js b/source/Ox.UI/js/Video/VideoAnnotationPanel.js index 900e9477..88764661 100644 --- a/source/Ox.UI/js/Video/VideoAnnotationPanel.js +++ b/source/Ox.UI/js/Video/VideoAnnotationPanel.js @@ -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() {