update large timeline tooltip while playing

This commit is contained in:
rolux 2010-09-18 12:15:09 +00:00
parent 67395d6be7
commit 376c3deb34

View File

@ -6111,30 +6111,32 @@ requires
function emptyFirstPage() {
Ox.print('emptyFirstPage', self.$pages);
self.$pages[0].find('.OxEmpty').remove();
self.$pages[0] && self.$pages[0].find('.OxEmpty').remove();
}
function fillFirstPage() {
var height = getHeight(),
lastItemHeight = height % self.options.itemHeight || self.options.itemHeight,
visibleItems = Math.ceil(height / self.options.itemHeight);
if (self.$items.length < visibleItems) {
$.each(Ox.range(self.$items.length, visibleItems), function(i, v) {
var $item = new Ox.ListItem({
construct: self.options.construct,
data: {},
id: '',
position: v
});
$item.addClass('OxEmpty').removeClass('OxTarget');
if (v == visibleItems - 1) {
$item.$element.css({
height: lastItemHeight + 'px',
overflowY: 'hidden'
});
}
$item.appendTo(self.$pages[0]);
});
if (self.$pages[0]) {
var height = getHeight(),
lastItemHeight = height % self.options.itemHeight || self.options.itemHeight,
visibleItems = Math.ceil(height / self.options.itemHeight);
if (self.$items.length < visibleItems) {
$.each(Ox.range(self.$items.length, visibleItems), function(i, v) {
var $item = new Ox.ListItem({
construct: self.options.construct,
data: {},
id: '',
position: v
});
$item.addClass('OxEmpty').removeClass('OxTarget');
if (v == visibleItems - 1) {
$item.$element.css({
height: lastItemHeight + 'px',
overflowY: 'hidden'
});
}
$item.appendTo(self.$pages[0]);
});
}
}
}
@ -9107,16 +9109,9 @@ requires
}
function mousemove(e) {
var position = self.options.position + (e.clientX - that.offset().left - self.center) / self.fps;
if (position >= 0 && position <= self.options.duration) {
self.$tooltip
.options({
title: Ox.formatDuration(position, 3)
})
.show(e.clientX, e.clientY);
} else {
self.$tooltip.hide();
}
self.clientX = e.clientX;
self.clientY = e.clientY;
updateTooltip();
}
function setMarkerPoint(i) {
@ -9149,6 +9144,7 @@ requires
.appendTo(self.$timeline);
}
});
updateTooltip();
}
function setWidth() {
@ -9162,6 +9158,19 @@ requires
setMarker();
}
function updateTooltip() {
var position = self.options.position + (self.clientX - that.offset().left - self.center) / self.fps;
if (position >= 0 && position <= self.options.duration) {
self.$tooltip
.options({
title: Ox.formatDuration(position, 3)
})
.show(self.clientX, self.clientY);
} else {
self.$tooltip.hide();
}
}
self.onChange = function(key, value) {
if (key == 'points') {
setMarkerPoint(0);
@ -9303,7 +9312,7 @@ requires
imageData = context.createImageData(width, height),
data = imageData.data;
$.each(self.options.subtitles, function(i, v) {
var color = matches.indexOf(i) > -1 ? [255, 255, 0] : [255, 255, 255]
var color = self.options.matches.indexOf(i) > -1 ? [255, 255, 0] : [255, 255, 255]
$.each(Ox.range(
Math.round(v['in']),
Math.round(v['out']) + 1
@ -9574,17 +9583,15 @@ requires
that.addEvent({
key_alt_left: function() {
movePositionBy(-0.04);
},
key_alt_right: function() {
movePositionBy(0.04);
},
key_alt_shift_left: function() {
movePositionTo('cut', -1);
},
key_alt_shift_right: function() {
key_alt_right: function() {
movePositionTo('cut', 1);
},
key_alt_shift_left: function() {
},
key_alt_shift_right: function() {
},
key_closebracket: function() {
goToPoint('out');
},
@ -9624,10 +9631,12 @@ requires
movePositionBy(self.options.duration);
},
key_shift_left: function() {
movePositionBy(-60);
movePositionBy(-0.04);
//movePositionBy(-60);
},
key_shift_right: function() {
movePositionBy(60);
movePositionBy(0.04);
//movePositionBy(60);
},
key_shift_up: function() {
movePositionBy(-self.options.duration);