use Ox.break
This commit is contained in:
parent
3d4a79b6a2
commit
04784630d3
42 changed files with 117 additions and 118 deletions
|
|
@ -188,10 +188,10 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
if (item.id == annotationId) {
|
||||
annotation = item;
|
||||
found = true;
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
return !found;
|
||||
found && Ox.break();
|
||||
});
|
||||
return annotation;
|
||||
}
|
||||
|
|
@ -203,10 +203,10 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
if (item.id == annotationId) {
|
||||
folder = self.$folder[i];
|
||||
found = true;
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
return !found;
|
||||
found && Ox.break();
|
||||
});
|
||||
return folder;
|
||||
}
|
||||
|
|
@ -427,7 +427,7 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
self.deselecting = true;
|
||||
$folder.options({selected: ''});
|
||||
self.deselecting = false;
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
scrollToSelected(self.options.layers[index].type);
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ Ox.BlockVideoTimeline = function(options, self) {
|
|||
Ox.forEach(self.options.subtitles, function(v) {
|
||||
if (v['in'] <= position && v.out > position) {
|
||||
subtitle = v;
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
return subtitle;
|
||||
|
|
|
|||
|
|
@ -118,7 +118,7 @@ Ox.SmallVideoTimeline = function(options, self) {
|
|||
Ox.forEach(self.options.subtitles, function(v) {
|
||||
if (v['in'] <= position && v.out > position) {
|
||||
subtitle = v;
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
return subtitle;
|
||||
|
|
|
|||
|
|
@ -863,10 +863,10 @@ Ox.VideoEditor = function(options, self) {
|
|||
if (item.id == annotationId) {
|
||||
value = item.value;
|
||||
found = true;
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
return !found;
|
||||
found && Ox.break();
|
||||
});
|
||||
return value;
|
||||
}
|
||||
|
|
@ -917,7 +917,7 @@ Ox.VideoEditor = function(options, self) {
|
|||
) {
|
||||
position = v;
|
||||
found = true;
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
direction == -1 && positions.reverse();
|
||||
|
|
@ -1104,7 +1104,7 @@ Ox.VideoEditor = function(options, self) {
|
|||
'in': i ? self.options.cuts[i - 1] : 0,
|
||||
out: cut - 1 / self.options.fps
|
||||
};
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
self.options.selected = '';
|
||||
|
|
|
|||
|
|
@ -231,7 +231,7 @@ Ox.VideoEditorPlayer = function(options, self) {
|
|||
Ox.forEach(self.options.subtitles, function(v) {
|
||||
if (v['in'] <= self.options.position && v['out'] > self.options.position) {
|
||||
subtitle = v.value;
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
return subtitle;
|
||||
|
|
@ -273,8 +273,8 @@ Ox.VideoEditorPlayer = function(options, self) {
|
|||
self.$markerFrame.show() : self.$markerFrame.hide();
|
||||
Ox.forEach(self.$markerPoint, function(markers, point) {
|
||||
Ox.forEach(markers, function(marker) {
|
||||
self.options.position == self.options.points[point == 'in' ? 0 : 1] ?
|
||||
marker.show() : marker.hide();
|
||||
self.options.position == self.options.points[point == 'in' ? 0 : 1]
|
||||
? marker.show() : marker.hide();
|
||||
});
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -441,9 +441,9 @@ Ox.VideoElement = function(options, self) {
|
|||
}
|
||||
});
|
||||
} else {
|
||||
Ox.forEach(self.items[0].$videos, function($video, i) {
|
||||
self.items[0].$videos.forEach(function($video, i) {
|
||||
var src = self.options.src[i];
|
||||
if(Ox.parseURL(src).protocol.substr(0, 4) == 'http') {
|
||||
if (Ox.parseURL(src).protocol.substr(0, 4) == 'http') {
|
||||
src += '?' + Ox.uid();
|
||||
}
|
||||
$video[0].src = src;
|
||||
|
|
|
|||
|
|
@ -1214,7 +1214,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
&& v.out > self.options.position
|
||||
) {
|
||||
censored = true;
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
return censored;
|
||||
|
|
@ -1392,7 +1392,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
&& v.out >= self.options.position
|
||||
) {
|
||||
subtitle = v.text;
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
return subtitle;
|
||||
|
|
@ -1441,7 +1441,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
var left = 0;
|
||||
Ox.forEach(self.options.controlsBottom, function(control) {
|
||||
if (control == 'timeline') {
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
left += control == 'position' ? self.positionWidth : 16
|
||||
});
|
||||
|
|
@ -1525,7 +1525,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
) {
|
||||
result = v
|
||||
found = true;
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
direction == -1 && self.results.reverse();
|
||||
|
|
@ -1882,16 +1882,16 @@ Ox.VideoPlayer = function(options, self) {
|
|||
function setMarkers() {
|
||||
//Ox.Log('Video', 'SET MARKERS', self.options.position, self.options['in'], self.options.out, self.$pointMarker);
|
||||
Ox.forEach(self.$posterMarker, function(marker) {
|
||||
isEqual(self.options.position, self.options.posterFrame) ?
|
||||
marker.show() : marker.hide();
|
||||
isEqual(self.options.position, self.options.posterFrame)
|
||||
? marker.show() : marker.hide();
|
||||
});
|
||||
Ox.forEach(self.$pointMarker, function(markers, point) {
|
||||
Ox.forEach(markers, function(marker) {
|
||||
//Ox.Log('Video', self.options.position, self.options[point], isEqual(self.options.position, self.options[point]))
|
||||
// fixme: there's a bug in jquery and/or webkit
|
||||
// on load, show() doesn't work
|
||||
isEqual(self.options.position, self.options[point]) ?
|
||||
marker.css({display: 'block'}) : marker.hide();
|
||||
isEqual(self.options.position, self.options[point])
|
||||
? marker.css({display: 'block'}) : marker.hide();
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -485,7 +485,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
|
|||
Ox.forEach(self.options.subtitles, function(v) {
|
||||
if (v['in'] <= position && v.out > position) {
|
||||
subtitle = v;
|
||||
return false;
|
||||
Ox.break();
|
||||
}
|
||||
});
|
||||
return subtitle;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue