1
0
Fork 0
forked from 0x2620/oxjs

pass video editor keyboard events when annotations have focus (fixes #318)

This commit is contained in:
rlx 2012-02-15 22:20:19 +00:00
commit 6f3a4d1386
3 changed files with 36 additions and 76 deletions

View file

@ -219,32 +219,18 @@ Ox.AnnotationPanel = function(options, self) {
layer.type == 'event' ? 'calendar' : 'map'
), data);
},
key_b: function() {
that.triggerEvent('key_b');
},
key_equal: function() {
that.triggerEvent('key_equal');
},
key_f: function() {
that.triggerEvent('key_f');
},
key_g: function() {
that.triggerEvent('key_g');
},
key_minus: function() {
that.triggerEvent('key_minus');
},
key_n: function() {
that.triggerEvent('key_n');
},
key_shift_g: function() {
that.triggerEvent('key_shift_g');
},
key_space: function() {
that.triggerEvent('key_space');
}
})
.appendTo(self.$folders);
[
'0', 'b', 'backslash', 'closebracket', 'comma', 'dot', 'equal',
'f', 'g', 'h', 'i', 'minus', 'n', 'o', 'openbracket', 'p',
'shift_0', 'shift_g', 'shift_i', 'shift_o', 'slash', 'space'
].forEach(function(key) {
key = 'key_' + key;
self.$folder[i].bindEvent(key, function() {
that.triggerEvent(key);
});
});
});
that.setElement(