forked from 0x2620/oxjs
updating video elements (fixes bugs with positions and points)
This commit is contained in:
parent
3c419d3ee7
commit
3f90e96c3a
6 changed files with 44 additions and 24 deletions
|
|
@ -37,7 +37,7 @@ Ox.LargeVideoTimeline = function(options, self) {
|
|||
drag: drag
|
||||
});
|
||||
|
||||
$.extend(self, {
|
||||
Ox.extend(self, {
|
||||
$cuts: [],
|
||||
$pointMarker: {},
|
||||
$tiles: {},
|
||||
|
|
@ -95,9 +95,9 @@ Ox.LargeVideoTimeline = function(options, self) {
|
|||
setPosition();
|
||||
|
||||
function click(event, e) {
|
||||
self.options.position = Ox.limit(
|
||||
self.options.position = Ox.round(Ox.limit(
|
||||
getPosition(e), 0, self.options.duration
|
||||
);
|
||||
), 3);
|
||||
setPosition();
|
||||
triggerPositionEvent();
|
||||
}
|
||||
|
|
@ -107,10 +107,10 @@ Ox.LargeVideoTimeline = function(options, self) {
|
|||
}
|
||||
|
||||
function drag(event, e) {
|
||||
self.options.position = Ox.limit(
|
||||
self.options.position = Ox.round(Ox.limit(
|
||||
self.options.position + (self.drag.x - e.clientX) / self.fps,
|
||||
0, self.options.duration
|
||||
);
|
||||
), 3);
|
||||
self.drag.x = e.clientX;
|
||||
setPosition();
|
||||
triggerPositionEvent();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue