diff --git a/source/Ox.UI/js/Video/Ox.AnnotationPanel.js b/source/Ox.UI/js/Video/Ox.AnnotationPanel.js index 7a7c49f5..b742aa0e 100644 --- a/source/Ox.UI/js/Video/Ox.AnnotationPanel.js +++ b/source/Ox.UI/js/Video/Ox.AnnotationPanel.js @@ -278,6 +278,7 @@ Ox.AnnotationPanel = function(options, self) { if (self.options.selected) { annotation = getAnnotation(self.options.selected); folder = getFolder(self.options.selected); + Ox.print('>>>>?', annotation, folder, self.options.selected); key = folder.options('id'); type = folder.options('type'); value = annotation.value; @@ -454,27 +455,28 @@ Ox.AnnotationPanel = function(options, self) { that.addItem = function(layer, item) { // called from addannotation callback var i = Ox.getIndexById(self.options.layers, layer); - renderEditMenu(); self.$folder[i].addItem(item); + renderEditMenu(); }; that.blurItem = function() { self.editing = false; - renderEditMenu(); getFolder(self.options.selected).blurItem(); + renderEditMenu(); }; that.editItem = function() { self.editing = true; - renderEditMenu(); getFolder(self.options.selected).editItem(); + renderEditMenu(); }; that.updateItem = function(id, item) { // called from editannotation callback + // on the first update of a new annotation, the id will change self.options.selected = item.id; - renderEditMenu(); getFolder(id).updateItem(id, item); + renderEditMenu(); }; return that;