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