1
0
Fork 0
forked from 0x2620/oxjs

update video editor

This commit is contained in:
rlx 2012-01-13 00:34:32 +05:30
commit f61e39a788
9 changed files with 141 additions and 80 deletions

View file

@ -630,12 +630,12 @@ Ox.VideoEditor = function(options, self) {
layer: data.layer
});
},
select: function(data) {
!data.id && that.gainFocus();
selectAnnotation(data);
},
resize: resizeAnnotations,
resizeend: resizeendAnnotations,
select: selectAnnotation,
submit: submitAnnotation,
toggle: function(data) {
toggle: toggleAnnotations,
togglelayer: function(data) {
that.triggerEvent('togglelayer', {
collapsed: data.collapsed,
layer: data.layer
@ -904,30 +904,11 @@ Ox.VideoEditor = function(options, self) {
function resizeAnnotations(data) {
self.options.annotationsSize = data.size;
setSizes();
self.$annotationPanel.options({width: data.size});
}
function resizeendAnnotations(data) {
that.triggerEvent('annotationsSize', {size: data.size});
}
function resizeEditor(data) {
var width = data.size - 2 * margin + 100;
resizeVideoPlayers(width);
$timelineLarge.options({width: width});
$timelineSmall.options({width: width});
}
function resizePlayers() {
self.$player.forEach(function(v, i) {
v.options({
width: size[i].width,
height: size[i].height
})
.css({
left: size[i].left + 'px',
top: size[i].top + 'px',
});
});
that.triggerEvent('annotationssize', {size: data.size});
}
function selectAnnotation(data) {
@ -935,6 +916,8 @@ Ox.VideoEditor = function(options, self) {
if (Ox.isUndefined(data)) {
// doubleclick on small timeline
data = getAnnotation();
} else if (!data.id) {
that.gainFocus();
}
self.editing = false;
self.options.selected = data.id;