allow for retrieving currently shown annotations from video annotation panel

This commit is contained in:
rlx 2014-09-18 16:43:00 +02:00
commit f1120a825b
3 changed files with 23 additions and 2 deletions

View file

@ -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 <f> Remove selected item
() -> <o> AnnotationPanel