forked from 0x2620/oxjs
update infolist
This commit is contained in:
parent
57ed9f9680
commit
5d669f42e3
4 changed files with 60 additions and 38 deletions
|
|
@ -11,6 +11,7 @@ Ox.BlockVideoTimeline = function(options, self) {
|
|||
out: 0,
|
||||
position: 0,
|
||||
results: [],
|
||||
showPointMarkers: false,
|
||||
subtitles: [],
|
||||
width: 0
|
||||
})
|
||||
|
|
@ -18,7 +19,6 @@ Ox.BlockVideoTimeline = function(options, self) {
|
|||
.addClass('OxBlockVideoTimeline')
|
||||
.css({
|
||||
position: 'absolute',
|
||||
//background: 'rgba(192, 192, 192, 0.1)'
|
||||
})
|
||||
.bind({
|
||||
mousedown: mousedown,
|
||||
|
|
@ -69,17 +69,19 @@ Ox.BlockVideoTimeline = function(options, self) {
|
|||
.appendTo(that.$element);
|
||||
setPositionMarker();
|
||||
|
||||
self.$pointMarker = {};
|
||||
['in', 'out'].forEach(function(point) {
|
||||
var titlecase = Ox.toTitleCase(point);
|
||||
self.$pointMarker[point] = $('<img>')
|
||||
.addClass('OxMarkerPoint' + titlecase)
|
||||
.attr({
|
||||
src: Ox.UI.getImageURL('marker' + titlecase)
|
||||
})
|
||||
.appendTo(that.$element);
|
||||
setPointMarker(point);
|
||||
});
|
||||
if (self.options.showPointMarkers) {
|
||||
self.$pointMarker = {};
|
||||
['in', 'out'].forEach(function(point) {
|
||||
var titlecase = Ox.toTitleCase(point);
|
||||
self.$pointMarker[point] = $('<img>')
|
||||
.addClass('OxMarkerPoint' + titlecase)
|
||||
.attr({
|
||||
src: Ox.UI.getImageURL('marker' + titlecase)
|
||||
})
|
||||
.appendTo(that.$element);
|
||||
setPointMarker(point);
|
||||
});
|
||||
}
|
||||
|
||||
function addLine(i) {
|
||||
self.$lines[i] = $('<div>')
|
||||
|
|
@ -99,7 +101,8 @@ Ox.BlockVideoTimeline = function(options, self) {
|
|||
})
|
||||
.appendTo(self.$lines[i]);
|
||||
self.$interfaces[i] = $('<div>')
|
||||
.addClass('OxInterface')
|
||||
// OxTarget and OxSpecialTarget are needed for InfoList
|
||||
.addClass('OxInterface OxTarget OxSpecialTarget')
|
||||
.css({
|
||||
position: 'absolute',
|
||||
top: '2px',
|
||||
|
|
@ -139,6 +142,7 @@ Ox.BlockVideoTimeline = function(options, self) {
|
|||
// fixme: check if this pattern is better
|
||||
// than the one used for list selection
|
||||
if (!self.triggered) {
|
||||
Ox.print('trigger............')
|
||||
that.triggerEvent('position', {
|
||||
position: self.options.position
|
||||
});
|
||||
|
|
@ -236,8 +240,10 @@ Ox.BlockVideoTimeline = function(options, self) {
|
|||
self.$images.pop();
|
||||
}
|
||||
setPositionMarker();
|
||||
setPointMarker('in');
|
||||
setPointMarker('out');
|
||||
if (self.options.showPointMarkers) {
|
||||
setPointMarker('in');
|
||||
setPointMarker('out');
|
||||
}
|
||||
}
|
||||
|
||||
function updateTimelines() {
|
||||
|
|
@ -254,7 +260,7 @@ Ox.BlockVideoTimeline = function(options, self) {
|
|||
|
||||
self.setOption = function(key, value) {
|
||||
if (key == 'in' || key == 'out') {
|
||||
setPoint(key);
|
||||
self.options.showPointMarkers && setPoint(key);
|
||||
} else if (key == 'position') {
|
||||
setPositionMarker();
|
||||
} else if (key == 'results') {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue