forked from 0x2620/oxjs
video editor improvements
This commit is contained in:
parent
f8ec3fccf4
commit
a1deb20f97
8 changed files with 89 additions and 50 deletions
|
|
@ -39,7 +39,7 @@ Ox.LargeVideoTimeline = function(options, self) {
|
|||
|
||||
$.extend(self, {
|
||||
$cuts: [],
|
||||
$markerPoint: {},
|
||||
$pointMarker: {},
|
||||
$tiles: {},
|
||||
$tooltip: new Ox.Tooltip({
|
||||
animate: false
|
||||
|
|
@ -82,13 +82,13 @@ Ox.LargeVideoTimeline = function(options, self) {
|
|||
|
||||
['in', 'out'].forEach(function(point) {
|
||||
var titlecase = Ox.toTitleCase(point);
|
||||
self.$markerPoint[point] = $('<img>')
|
||||
self.$pointMarker[point] = $('<img>')
|
||||
.addClass('OxMarkerPoint' + titlecase)
|
||||
.attr({
|
||||
src: Ox.UI.PATH + 'png/videoMarker' + titlecase + '.png'
|
||||
})
|
||||
.appendTo(self.$timeline);
|
||||
setMarkerPoint(point);
|
||||
setPointMarker(point);
|
||||
});
|
||||
|
||||
setWidth();
|
||||
|
|
@ -132,18 +132,18 @@ Ox.LargeVideoTimeline = function(options, self) {
|
|||
updateTooltip();
|
||||
}
|
||||
|
||||
function setMarkerPoint(point) {
|
||||
self.$markerPoint[point].css({
|
||||
left: (self.options[point] * self.fps) + 'px'
|
||||
});
|
||||
}
|
||||
|
||||
function setMarker() {
|
||||
self.$markerPosition.css({
|
||||
left: (self.center - 4) + 'px',
|
||||
});
|
||||
}
|
||||
|
||||
function setPointMarker(point) {
|
||||
self.$pointMarker[point].css({
|
||||
left: (self.options[point] * self.fps) + 'px'
|
||||
});
|
||||
}
|
||||
|
||||
function setPosition() {
|
||||
self.tile = parseInt(self.options.position * self.fps / self.tileWidth);
|
||||
self.$timeline.css({
|
||||
|
|
@ -215,9 +215,10 @@ Ox.LargeVideoTimeline = function(options, self) {
|
|||
}
|
||||
|
||||
self.setOption = function(key, value) {
|
||||
if (key == 'points') {
|
||||
setMarkerPoint('in');
|
||||
setMarkerPoint('out');
|
||||
if (key == 'in') {
|
||||
setPointMarker('in');
|
||||
} else if (key == 'out') {
|
||||
setPointMarker('out');
|
||||
} else if (key == 'position') {
|
||||
setPosition();
|
||||
} else if (key == 'subtitles') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue