set width of timelines player timelines to the correct value after resize

This commit is contained in:
rlx 2012-04-19 13:03:16 +00:00
parent ae33784cc1
commit 018dc69939
2 changed files with 3 additions and 3 deletions

View file

@ -266,7 +266,7 @@ Ox.VideoTimelinePanel = function(options, self) {
} else if (key == 'showAnnotations') {
that.$element.toggle(1);
} else if (key == 'width') {
self.$player.options({width: value});
self.$player.options({width: getPlayerWidth()});
}
};

View file

@ -681,7 +681,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
}
function setWidth() {
self.contentWidth = self.options.width - 2 * self.margin - Ox.UI.SCROLLBAR_SIZE;
self.contentWidth = self.options.width - 2 * self.margin;
self.lines = getLines();
Ox.loop(self.lines, function(i) {
if (self.$lines[i]) {
@ -692,7 +692,7 @@ Ox.VideoTimelinePlayer = function(options, self) {
marginLeft: -i * self.contentWidth + 'px'
});
self.$timelines[i][1].css({
marginLeft: -i * self.contentWidth + self.videoWidth + 'px'
marginLeft: -i * self.contentWidth + self.videoWidth - 1 + 'px'
});
} else {
addLine(i);