when reaching full minute, round position to full minute

This commit is contained in:
rlx 2012-03-25 21:49:36 +00:00
parent 8e6787be97
commit 5d1b204e45
2 changed files with 5 additions and 3 deletions

View file

@ -1140,7 +1140,7 @@ Ox.VideoEditor = function(options, self) {
});
if (!playing || minute != previousMinute) {
that.triggerEvent('position', {
position: self.options.position
position: !playing ? self.options.position : minute * 60
});
}
}

View file

@ -368,14 +368,16 @@ Ox.VideoPanel = function(options, self) {
}
function setPosition(position, playing) {
var minute = minute = parseInt(position / 60),
var minute = parseInt(position / 60),
previousMinute = parseInt(self.options.position / 60);
self.options.position = position;
!playing && self.$video.options({position: self.options.position});
self.$timeline.options({position: self.options.position});
self.$annotationPanel.options({position: self.options.position});
if (!playing || minute != previousMinute) {
that.triggerEvent('position', {position: self.options.position});
that.triggerEvent('position', {
position: !playing ? self.options.position : minute * 60
});
}
}