large timeline: use ints in subtitle css

This commit is contained in:
rlx 2013-08-06 18:18:08 +00:00
parent 709e8d2474
commit da7b637948

View file

@ -218,8 +218,8 @@ Ox.LargeVideoTimeline = function(options, self) {
self.$subtitles[i] = $('<div>') self.$subtitles[i] = $('<div>')
.addClass('OxSubtitle' + (found ? ' OxHighlight' : '')) .addClass('OxSubtitle' + (found ? ' OxHighlight' : ''))
.css({ .css({
left: (subtitle['in'] * self.fps) + 'px', left: Math.round(subtitle['in'] * self.fps) + 'px',
width: (((subtitle.out - subtitle['in']) * self.fps) - 2) + 'px' width: Math.round(((subtitle.out - subtitle['in']) * self.fps) - 2) + 'px'
}) })
.html(Ox.highlight( .html(Ox.highlight(
subtitle.text, self.options.find, 'OxHighlight', true subtitle.text, self.options.find, 'OxHighlight', true