1
0
Fork 0
forked from 0x2620/oxjs

update Ox.URL

This commit is contained in:
rlx 2012-01-06 17:28:53 +05:30
commit dc4a8bf464
3 changed files with 38 additions and 41 deletions

View file

@ -157,6 +157,8 @@ Ox.VideoEditor = function(options, self) {
margin: 8,
});
Ox.print('VIDEO EDITOR OPTIONS', self.options)
self.words = [];
Ox.forEach(Ox.count(Ox.words(self.options.subtitles.map(function(subtitle) {
return subtitle.text;
@ -309,6 +311,8 @@ Ox.VideoEditor = function(options, self) {
self.$annotationPanel = [];
self.options.layers.forEach(function(layer, i) {
var item = Ox.getObjectById(layer.items, self.options.selected),
selected = item ? item.id : '';
self.$annotationPanel[i] = Ox.AnnotationPanel(
Ox.extend({
font: self.options.annotationsFont,
@ -316,7 +320,7 @@ Ox.VideoEditor = function(options, self) {
out: self.options.out,
position: self.options.position,
range: self.options.annotationsRange,
// selected: self.options.selected,
selected: selected,
sort: self.options.annotationsSort,
width: self.options.annotationsSize - Ox.UI.SCROLLBAR_SIZE
}, layer)
@ -338,13 +342,15 @@ Ox.VideoEditor = function(options, self) {
});
},
select: function(data) {
if(data.id) {
if (data.id) {
self.options.layers.forEach(function(layer_, i_) {
if (i_ != i) {
self.$annotationPanel[i_].deselectItems();
}
});
selectAnnotation(data);
} else {
// ...
}
},
submit: editAnnotation
@ -873,9 +879,9 @@ Ox.VideoEditor = function(options, self) {
//Ox.Log('Video', 'getSizes', scrollbarIsVisible, height, self.options.height, size)
return (!scrollbarIsVisible && height > self.options.height - 16) ? getSizes(true) : size;
function getHeight() {
return size.player[0].height + self.controlsHeight +
size.timeline[0].height + lines * 16 +
(lines + 3) * self.margin;
return size.player[0].height + self.controlsHeight
+ size.timeline[0].height + lines * 16
+ (lines + 3) * self.margin;
}
}
@ -930,11 +936,14 @@ Ox.VideoEditor = function(options, self) {
function selectAnnotation(data) {
self.options.annotationsRange != 'position' && setPosition(data['in']);
setState(data.id ? 'selected' : 'default');
that.triggerEvent('select', {
id: data.id || ''
});
if (data.id) {
setPoint('in', data['in']);
setPoint('out', data.out);
}
setState(data.id ? 'selected' : 'default');
}
function select(type) {
@ -942,7 +951,7 @@ Ox.VideoEditor = function(options, self) {
setPoints();
}
function setPoint(point, position) {
function setPoint(point, position, annotation) {
var otherPoint = point == 'in' ? 'out' : 'in';
self.options[point] = position;
if (self.options.state == 'selected') {