avoid double annotation on blur, fixes #3196

This commit is contained in:
j 2018-12-10 16:18:17 +01:00
parent cbd948740a
commit c821817c38

View file

@ -327,6 +327,7 @@ Ox.AnnotationFolder = function(options, self) {
blur: function(data) { blur: function(data) {
if (data && data.id[0] == '_') { if (data && data.id[0] == '_') {
changeAnnotation(data); changeAnnotation(data);
that.triggerEvent('blur');
} else { } else {
// the video editor will, if it has not received focus, // the video editor will, if it has not received focus,
// call blurItem // call blurItem
@ -410,9 +411,11 @@ Ox.AnnotationFolder = function(options, self) {
function changeAnnotation(data) { function changeAnnotation(data) {
var item = Ox.getObjectById(self.options.items, data.id); var item = Ox.getObjectById(self.options.items, data.id);
if (item.value != data.value) {
item.value = data.value; item.value = data.value;
that.triggerEvent('change', item); that.triggerEvent('change', item);
} }
}
function crossesPoint() { function crossesPoint() {
var positions = Ox.sort([self.position, self.options.position]); var positions = Ox.sort([self.position, self.options.position]);