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
|
|
@ -35,23 +35,7 @@ Ox.SmallVideoTimeline = function(options, self) {
|
|||
height: self.height + 'px'
|
||||
});
|
||||
|
||||
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: self.imageWidth,
|
||||
type: self.options.type
|
||||
})
|
||||
.css({
|
||||
position: 'absolute',
|
||||
left: self.imageLeft + 'px',
|
||||
width: self.options.width + 'px'
|
||||
})
|
||||
.appendTo(that);
|
||||
self.$image = getTimelineImage().appendTo(that);
|
||||
|
||||
self.$interface = Ox.Element()
|
||||
.addClass('OxInterface')
|
||||
|
|
@ -167,6 +151,25 @@ Ox.SmallVideoTimeline = function(options, self) {
|
|||
return subtitle;
|
||||
}
|
||||
|
||||
function getTimelineImage() {
|
||||
return 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: self.imageWidth,
|
||||
type: self.options.type
|
||||
})
|
||||
.css({
|
||||
position: 'absolute',
|
||||
left: self.imageLeft + 'px',
|
||||
width: self.imageWidth + 'px'
|
||||
});
|
||||
}
|
||||
|
||||
function mousedown(e) {
|
||||
if ($(e.target).is('.OxInterface')) {
|
||||
self.options.position = getPosition(e);
|
||||
|
|
@ -228,13 +231,14 @@ Ox.SmallVideoTimeline = function(options, self) {
|
|||
}
|
||||
|
||||
function setWidth() {
|
||||
self.imageWidth = self.options.width -
|
||||
(self.options.type == 'player' ? 16 : 8);
|
||||
that.css({
|
||||
width: self.options.width + 'px'
|
||||
});
|
||||
self.$image.css({
|
||||
width: self.imageWidth + 'px'
|
||||
});
|
||||
self.$image.children().css({
|
||||
self.$image.options({
|
||||
width: self.imageWidth
|
||||
}).css({
|
||||
width: self.imageWidth + 'px'
|
||||
});
|
||||
self.$interface.css({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue