remove Ox.each, , $.extend, $.map and $.merge
This commit is contained in:
parent
da9e5dbb29
commit
4cc754a28d
35 changed files with 104 additions and 131 deletions
|
|
@ -59,7 +59,7 @@ Ox.AnnotationPanel = function(options, self) {
|
|||
.addClass('OxAnnotation OxEditable OxTarget')
|
||||
.html(Ox.parseHTML(data.value));
|
||||
},
|
||||
items: $.map(self.options.items, function(v, i) {
|
||||
items: self.options.items.map(function(v, i) {
|
||||
return {
|
||||
id: v.id || i + '',
|
||||
value: v.value
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ Ox.BlockTimeline = function(options, self) {
|
|||
}
|
||||
});
|
||||
|
||||
$.extend(self, {
|
||||
Ox.extend(self, {
|
||||
$images: [],
|
||||
$lines: [],
|
||||
$markerPoint: [],
|
||||
|
|
@ -157,7 +157,7 @@ Ox.BlockTimeline = function(options, self) {
|
|||
context = canvas.getContext('2d'),
|
||||
imageData = context.createImageData(width, height),
|
||||
data = imageData.data,
|
||||
points = $.map(self.options.points, function(v, i) {
|
||||
points = self.options.points.map(function(v, i) {
|
||||
return Math.round(v) + i;
|
||||
}),
|
||||
top = 0,
|
||||
|
|
|
|||
|
|
@ -35,7 +35,7 @@ Ox.LargeTimeline = function(options, self) {
|
|||
drag: drag
|
||||
});
|
||||
|
||||
$.extend(self, {
|
||||
Ox.extend(self, {
|
||||
$cuts: [],
|
||||
$markerPoint: [],
|
||||
$subtitles: [],
|
||||
|
|
|
|||
|
|
@ -34,7 +34,7 @@ Ox.SmallTimeline = function(options, self) {
|
|||
}
|
||||
});
|
||||
|
||||
$.extend(self, {
|
||||
Ox.extend(self, {
|
||||
$images: [],
|
||||
$markerPoint: [],
|
||||
$subtitles: [],
|
||||
|
|
|
|||
|
|
@ -262,7 +262,7 @@ Ox.VideoEditor = function(options, self) {
|
|||
|
||||
self.options.layers.forEach(function(layer, i) {
|
||||
self.$annotationPanel[i] = Ox.AnnotationPanel(
|
||||
$.extend({
|
||||
Ox.extend({
|
||||
width: self.options.annotationSize
|
||||
}, layer)
|
||||
)
|
||||
|
|
@ -707,11 +707,11 @@ Ox.VideoEditor = function(options, self) {
|
|||
if (type == 'cut') {
|
||||
positions = self.options.cuts;
|
||||
} else if (type == 'result') {
|
||||
positions = $.map(self.results, function(v, i) {
|
||||
positions = self.results.map(function(v) {
|
||||
return v['in'];
|
||||
});
|
||||
} else if (type == 'subtitle') {
|
||||
positions = $.map(self.options.subtitles, function(v, i) {
|
||||
positions = self.options.subtitles.map(function(v) {
|
||||
return v['in'];
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue