forked from 0x2620/oxjs
remove Ox.Break
This commit is contained in:
parent
4139e171ca
commit
bda90f6b6b
44 changed files with 152 additions and 165 deletions
|
|
@ -228,10 +228,12 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
if (item.id == annotationId) {
|
||||
annotation = item;
|
||||
found = true;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
found && Ox.Break();
|
||||
if (found) {
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
return annotation;
|
||||
}
|
||||
|
|
@ -243,10 +245,12 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
if (item.id == annotationId) {
|
||||
folder = self.$folder[i];
|
||||
found = true;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
found && Ox.Break();
|
||||
if (found) {
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
return folder;
|
||||
}
|
||||
|
|
@ -468,7 +472,7 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
self.deselecting = true;
|
||||
$folder.options({selected: ''});
|
||||
self.deselecting = false;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
scrollToSelected(self.options.layers[index].type);
|
||||
|
|
|
|||
|
|
@ -168,7 +168,8 @@ Ox.BlockVideoTimeline = function(options, self) {
|
|||
}
|
||||
|
||||
function getPosition(e) {
|
||||
//FIXME: this might still be broken in opera according to http://acko.net/blog/mouse-handling-and-absolute-positions-in-javascript
|
||||
// FIXME: this might still be broken in opera according to
|
||||
// http://acko.net/blog/mouse-handling-and-absolute-positions-in-javascript
|
||||
return e.offsetX ? e.offsetX
|
||||
: e.clientX - $(e.target).offset().left;
|
||||
}
|
||||
|
|
@ -178,7 +179,7 @@ Ox.BlockVideoTimeline = function(options, self) {
|
|||
Ox.forEach(self.options.subtitles, function(v) {
|
||||
if (v['in'] <= position && v.out > position) {
|
||||
subtitle = v;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
return subtitle;
|
||||
|
|
|
|||
|
|
@ -155,7 +155,7 @@ Ox.SmallVideoTimeline = function(options, self) {
|
|||
Ox.forEach(self.options.subtitles, function(v) {
|
||||
if (v['in'] <= position && v.out > position) {
|
||||
subtitle = v;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
return subtitle;
|
||||
|
|
|
|||
|
|
@ -929,10 +929,12 @@ Ox.VideoEditor = function(options, self) {
|
|||
if (item.id == annotationId) {
|
||||
value = item.value;
|
||||
found = true;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
found && Ox.Break();
|
||||
if (found) {
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
return value;
|
||||
}
|
||||
|
|
@ -983,7 +985,7 @@ Ox.VideoEditor = function(options, self) {
|
|||
) {
|
||||
position = v;
|
||||
found = true;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
direction == -1 && positions.reverse();
|
||||
|
|
@ -1170,7 +1172,7 @@ Ox.VideoEditor = function(options, self) {
|
|||
'in': i ? self.options.cuts[i - 1] : 0,
|
||||
out: cut - 1 / self.options.fps
|
||||
};
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
setPoint('in', points['in']);
|
||||
|
|
|
|||
|
|
@ -239,7 +239,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;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
return subtitle;
|
||||
|
|
|
|||
|
|
@ -275,7 +275,7 @@ Ox.VideoElement = function(options, self) {
|
|||
if (item.offsets[i] <= time) {
|
||||
currentPart = i;
|
||||
currentTime = time - item.offsets[i];
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
Ox.Log('Video', 'sCT', time, currentPart, currentTime);
|
||||
|
|
|
|||
|
|
@ -1290,7 +1290,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
&& v.out > self.options.position
|
||||
) {
|
||||
censored = true;
|
||||
return false;
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
return censored;
|
||||
|
|
@ -1468,7 +1468,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
&& v.out >= self.options.position
|
||||
) {
|
||||
subtitle = v.text;
|
||||
return false;
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
return subtitle;
|
||||
|
|
@ -1517,7 +1517,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
var left = 0;
|
||||
Ox.forEach(self.options.controlsBottom, function(control) {
|
||||
if (control == 'timeline') {
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
left += control == 'position' ? self.positionWidth : 16
|
||||
});
|
||||
|
|
@ -1600,7 +1600,7 @@ Ox.VideoPlayer = function(options, self) {
|
|||
) {
|
||||
result = v
|
||||
found = true;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
direction == -1 && self.results.reverse();
|
||||
|
|
|
|||
|
|
@ -507,7 +507,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
|
|||
Ox.forEach(self.options.subtitles, function(v) {
|
||||
if (v['in'] <= position && v.out > position) {
|
||||
subtitle = v;
|
||||
Ox.Break();
|
||||
return false; // break
|
||||
}
|
||||
});
|
||||
return subtitle;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue