forked from 0x2620/oxjs
more efficient composition of block timeline, more efficient resizing of small timeline
This commit is contained in:
parent
9379599aeb
commit
ac2ea5f53d
4 changed files with 83 additions and 43 deletions
|
|
@ -43,9 +43,24 @@ Ox.BlockVideoTimeline = function(options, self) {
|
|||
|
||||
setCSS();
|
||||
|
||||
Ox.loop(self.lines, function(i) {
|
||||
addLine(i);
|
||||
});
|
||||
self.$image = Ox.SmallVideoTimelineImage({
|
||||
duration: self.options.duration,
|
||||
editing: self.options.editing,
|
||||
getTimelineURL: self.options.getTimelineURL,
|
||||
'in': self.options['in'],
|
||||
out: self.options.out,
|
||||
results: self.options.results,
|
||||
subtitles: self.options.subtitles,
|
||||
width: Math.ceil(self.options.duration),
|
||||
type: self.options.type
|
||||
})
|
||||
.bindEvent('load', function() {
|
||||
// wait until the timeline image (the one image that is async)
|
||||
// has loaded, so we can clone the element
|
||||
Ox.loop(self.lines, function(i) {
|
||||
addLine(i);
|
||||
});
|
||||
})
|
||||
|
||||
self.$positionMarker = $('<img>')
|
||||
.attr({
|
||||
|
|
@ -90,17 +105,7 @@ Ox.BlockVideoTimeline = function(options, self) {
|
|||
overflow: 'hidden'
|
||||
})
|
||||
.appendTo(that.$element);
|
||||
self.$images[i] = Ox.SmallVideoTimelineImage({
|
||||
duration: self.options.duration,
|
||||
editing: self.options.editing,
|
||||
getTimelineURL: self.options.getTimelineURL,
|
||||
'in': self.options['in'],
|
||||
out: self.options.out,
|
||||
results: self.options.results,
|
||||
subtitles: self.options.subtitles,
|
||||
width: Math.ceil(self.options.duration),
|
||||
type: self.options.type
|
||||
})
|
||||
self.$images[i] = self.$image.clone()
|
||||
.css({
|
||||
position: 'absolute',
|
||||
marginLeft: (-i * self.options.width) + 'px'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue