fix event handlers and split panel resize event
This commit is contained in:
parent
3f90e96c3a
commit
da9e5dbb29
27 changed files with 722 additions and 118 deletions
|
|
@ -267,26 +267,26 @@ Ox.VideoEditor = function(options, self) {
|
|||
}, layer)
|
||||
)
|
||||
.bindEvent({
|
||||
add: function(event, data) {
|
||||
add: function(data) {
|
||||
data.layer = layer.id;
|
||||
data['in'] = self.options['in'];
|
||||
data.out = self.options.out;
|
||||
that.triggerEvent('addannotation', data);
|
||||
},
|
||||
remove: function(event, data) {
|
||||
remove: function(data) {
|
||||
data = {
|
||||
ids: [data],
|
||||
layer: layer.id
|
||||
};
|
||||
that.triggerEvent('removeannotations', data);
|
||||
},
|
||||
select: function(event, data) {
|
||||
select: function(data) {
|
||||
self.options.layers.forEach(function(l, j) { // fixme: l? j?
|
||||
if(l.id != layer.id) {
|
||||
self.$annotationPanel[j].deselectItems();
|
||||
}
|
||||
});
|
||||
selectAnnotation(event, data);
|
||||
selectAnnotation(data);
|
||||
},
|
||||
submit: updateAnnotation
|
||||
});
|
||||
|
|
@ -852,13 +852,13 @@ Ox.VideoEditor = function(options, self) {
|
|||
self.$player[0].playInToOut();
|
||||
}
|
||||
|
||||
function resizeAnnotations(event, data) {
|
||||
self.options.annotationsSize = data;
|
||||
function resizeAnnotations(data) {
|
||||
self.options.annotationsSize = data.size;
|
||||
setSizes();
|
||||
}
|
||||
|
||||
function resizeEditor(event, data) {
|
||||
var width = data - 2 * margin + 100;
|
||||
function resizeEditor(data) {
|
||||
var width = data.size - 2 * margin + 100;
|
||||
resizeVideoPlayers(width);
|
||||
$timelineLarge.options({
|
||||
width: width
|
||||
|
|
@ -881,12 +881,12 @@ Ox.VideoEditor = function(options, self) {
|
|||
});
|
||||
}
|
||||
|
||||
function selectAnnotation(event, data) {
|
||||
function selectAnnotation(data) {
|
||||
setPosition(data['in']);
|
||||
setPoint('in', data['in']);
|
||||
setPoint('out', data.out);
|
||||
}
|
||||
function updateAnnotation(event, data) {
|
||||
function updateAnnotation(data) {
|
||||
data['in'] = self.options['in'];
|
||||
data.out = self.options.out;
|
||||
that.triggerEvent('updateannotation', data);
|
||||
|
|
@ -983,7 +983,7 @@ Ox.VideoEditor = function(options, self) {
|
|||
}
|
||||
}
|
||||
|
||||
function toggleAnnotations(event, data) {
|
||||
function toggleAnnotations(data) {
|
||||
self.options.showAnnotations = !data.collapsed;
|
||||
setSizes();
|
||||
that.triggerEvent('toggleannotations', {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue