fix a bug where pressing delete would not remove an annotation if the video editor had focus (fixes #477)
This commit is contained in:
parent
bd5b6f8230
commit
6a9707ed0b
3 changed files with 14 additions and 16 deletions
|
@ -614,17 +614,6 @@ Ox.AnnotationFolder = function(options, self) {
|
|||
}
|
||||
};
|
||||
|
||||
/*@
|
||||
removeItems <f> removeItems
|
||||
@*/
|
||||
/*
|
||||
that.removeItem = function(id) {
|
||||
var pos = Ox.getIndexById(self.options.items, id);
|
||||
self.options.items.splice(pos, 1);
|
||||
self.$annotations.removeItems && self.$annotations.removeItems([id]);
|
||||
};
|
||||
*/
|
||||
|
||||
that.updateItem = function(id, data) {
|
||||
Ox.print('-- UPDATE ITEM', id, data);
|
||||
var item = Ox.getObjectById(self.options.items, id);
|
||||
|
|
|
@ -486,11 +486,17 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
renderEditMenu();
|
||||
};
|
||||
|
||||
that.removeItem = function() {
|
||||
that.removeItem = function(remove) {
|
||||
if (remove) {
|
||||
// remove initiated by video editor
|
||||
getFolder(self.options.selected).removeItem();
|
||||
} else {
|
||||
// called from removeannotation callback
|
||||
self.options.selected = '';
|
||||
self.users = getUsers();
|
||||
renderOptionsMenu();
|
||||
renderEditMenu();
|
||||
}
|
||||
};
|
||||
|
||||
that.updateItem = function(id, item) {
|
||||
|
|
|
@ -83,6 +83,9 @@ Ox.VideoEditor = function(options, self) {
|
|||
key_comma: function() {
|
||||
movePositionTo('cut', -1);
|
||||
},
|
||||
key_delete: function() {
|
||||
self.$annotationPanel.removeItem(true);
|
||||
},
|
||||
key_dot: function() {
|
||||
movePositionTo('cut', 1);
|
||||
},
|
||||
|
|
Loading…
Reference in a new issue