diff --git a/source/Ox.UI/js/Video/AnnotationFolder.js b/source/Ox.UI/js/Video/AnnotationFolder.js index 16bb024b..a4338dff 100644 --- a/source/Ox.UI/js/Video/AnnotationFolder.js +++ b/source/Ox.UI/js/Video/AnnotationFolder.js @@ -106,7 +106,9 @@ Ox.AnnotationFolder = function(options, self) { self.$widget.options({width: self.options.width}); } self.$annotations.options({ - width: self.options.type == 'text' ? self.options.width + 8 : self.options.width + width: self.options.type == 'text' + ? self.options.width + 8 + : self.options.width }); } }); @@ -646,6 +648,10 @@ Ox.AnnotationFolder = function(options, self) { return that; }; + that.getCurrentAnnotations = function() { + return getAnnotations(); + }; + /*@ removeItem remove item () -> remove selected item diff --git a/source/Ox.UI/js/Video/AnnotationPanel.js b/source/Ox.UI/js/Video/AnnotationPanel.js index 94fca84a..6e78ad16 100644 --- a/source/Ox.UI/js/Video/AnnotationPanel.js +++ b/source/Ox.UI/js/Video/AnnotationPanel.js @@ -493,7 +493,8 @@ Ox.AnnotationPanel = function(options, self) { $folder.options({users: self.enabledUsers}); }); } else { - set[data.id] = data.checked[0].id; + self.options[data.id] = data.checked[0].id; + set[data.id] = self.options[data.id]; self.$folder.forEach(function($folder) { $folder.options(set); }); @@ -646,6 +647,16 @@ Ox.AnnotationPanel = function(options, self) { return that; }; + that.getCurrentAnnotations = function() { + var annotations = {}; + self.options.layers.forEach(function(layer) { + annotations[layer.id] = self.$folder[ + Ox.getIndexById(self.options.layers, layer.id) + ].getCurrentAnnotations(); + }); + return annotations; + }; + /*@ removeItem Remove selected item () -> AnnotationPanel diff --git a/source/Ox.UI/js/Video/VideoAnnotationPanel.js b/source/Ox.UI/js/Video/VideoAnnotationPanel.js index db5f6070..7b794396 100644 --- a/source/Ox.UI/js/Video/VideoAnnotationPanel.js +++ b/source/Ox.UI/js/Video/VideoAnnotationPanel.js @@ -1632,6 +1632,10 @@ Ox.VideoAnnotationPanel = function(options, self) { self.$annotationPanel.addItem(layer, annotation); }; + that.getCurrentAnnotations = function() { + return self.$annotationPanel.getCurrentAnnotations(); + }; + /*@ updateAnnotation updateAnnotation (id, annotation) -> update annotation with id