make space work when annotation panel has focus; give focus to video editor when deselecting annotation in panel
This commit is contained in:
parent
ef82ff8967
commit
e98696b93d
2 changed files with 10 additions and 5 deletions
|
@ -96,7 +96,10 @@ Ox.AnnotationPanel = function(options, self) {
|
||||||
that.triggerEvent('edit');
|
that.triggerEvent('edit');
|
||||||
},
|
},
|
||||||
select: selectAnnotation,
|
select: selectAnnotation,
|
||||||
submit: submitAnnotation
|
submit: submitAnnotation,
|
||||||
|
key_space: function() {
|
||||||
|
that.triggerEvent('paused');
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
self.$annotations.appendTo(that.$content);
|
self.$annotations.appendTo(that.$content);
|
||||||
|
|
|
@ -383,6 +383,7 @@ Ox.VideoEditor = function(options, self) {
|
||||||
self.editing = true;
|
self.editing = true;
|
||||||
setTimelineState();
|
setTimelineState();
|
||||||
},
|
},
|
||||||
|
paused: togglePaused,
|
||||||
remove: function(data) {
|
remove: function(data) {
|
||||||
that.triggerEvent('removeannotation', {
|
that.triggerEvent('removeannotation', {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
|
@ -396,6 +397,8 @@ Ox.VideoEditor = function(options, self) {
|
||||||
self.$annotationPanel[i_].options({selected: ''});
|
self.$annotationPanel[i_].options({selected: ''});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
that.gainFocus();
|
||||||
}
|
}
|
||||||
selectAnnotation(data);
|
selectAnnotation(data);
|
||||||
},
|
},
|
||||||
|
@ -738,8 +741,9 @@ Ox.VideoEditor = function(options, self) {
|
||||||
|
|
||||||
self.$editMenuButton = Ox.MenuButton({
|
self.$editMenuButton = Ox.MenuButton({
|
||||||
items: [
|
items: [
|
||||||
{id: 'edit', title: 'Edit Selected Annotation', disabled: !self.options.selected, keyboard: 'return'},
|
{id: 'edit', title: 'Edit Annotation', disabled: !self.options.selected, keyboard: 'return'},
|
||||||
{id: 'delete', title: 'Delete Selected Annotation', disabled: !self.options.selected, keyboard: 'delete'},
|
{id: 'delete', title: 'Delete Annotation', disabled: !self.options.selected, keyboard: 'delete'},
|
||||||
|
{id: 'deselect', title: 'Deselect Annotation', disabled: !self.options.selected, keyboard: 'escape'},
|
||||||
{},
|
{},
|
||||||
{id: 'save', title: 'Save Changes', disabled: true, keyboard: 'shift return'},
|
{id: 'save', title: 'Save Changes', disabled: true, keyboard: 'shift return'},
|
||||||
{id: 'undo', title: 'Undo Changes', disabled: true, keyboard: 'escape'}
|
{id: 'undo', title: 'Undo Changes', disabled: true, keyboard: 'escape'}
|
||||||
|
@ -1290,11 +1294,9 @@ Ox.VideoEditor = function(options, self) {
|
||||||
|
|
||||||
function togglePaused() {
|
function togglePaused() {
|
||||||
self.$player[0].togglePaused();
|
self.$player[0].togglePaused();
|
||||||
///* FIXME
|
|
||||||
self.$player[0].options('paused') && that.triggerEvent('position', {
|
self.$player[0].options('paused') && that.triggerEvent('position', {
|
||||||
position: self.$player[0].options('position')
|
position: self.$player[0].options('position')
|
||||||
});
|
});
|
||||||
//*/
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function toggleSize() {
|
function toggleSize() {
|
||||||
|
|
Loading…
Reference in a new issue