forked from 0x2620/oxjs
some bugfixes
This commit is contained in:
parent
4cc754a28d
commit
ef1fa5fe84
14 changed files with 228 additions and 229 deletions
|
|
@ -29,8 +29,8 @@ Ox.BlockTimeline = function(options, self) {
|
|||
.mouseleave(mouseleave)
|
||||
.mousemove(mousemove)
|
||||
.bindEvent({
|
||||
drag: function(event, e) {
|
||||
mousedown(e);
|
||||
drag: function(data) {
|
||||
mousedown(data);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -26,8 +26,8 @@ Ox.BlockVideoTimeline = function(options, self) {
|
|||
mousemove: mousemove
|
||||
})
|
||||
.bindEvent({
|
||||
drag: function(event, e) {
|
||||
mousedown(e);
|
||||
drag: function(data) {
|
||||
mousedown(data);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -101,24 +101,24 @@ Ox.LargeTimeline = function(options, self) {
|
|||
setWidth();
|
||||
setPosition();
|
||||
|
||||
function click(event, e) {
|
||||
function click(data) {
|
||||
self.options.position = Ox.limit(
|
||||
getPosition(e), 0, self.options.duration
|
||||
getPosition(data), 0, self.options.duration
|
||||
);
|
||||
setPosition();
|
||||
triggerChangeEvent();
|
||||
}
|
||||
|
||||
function dragstart(event, e) {
|
||||
self.drag = {x: e.clientX};
|
||||
function dragstart(data) {
|
||||
self.drag = {x: data.clientX};
|
||||
}
|
||||
|
||||
function drag(event, e) {
|
||||
function drag(data) {
|
||||
self.options.position = Ox.limit(
|
||||
self.options.position + (self.drag.x - e.clientX) / self.fps,
|
||||
self.options.position + (self.drag.x - data.clientX) / self.fps,
|
||||
0, self.options.duration
|
||||
);
|
||||
self.drag.x = e.clientX;
|
||||
self.drag.x = data.clientX;
|
||||
setPosition();
|
||||
triggerChangeEvent();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -94,24 +94,24 @@ Ox.LargeVideoTimeline = function(options, self) {
|
|||
setWidth();
|
||||
setPosition();
|
||||
|
||||
function click(event, e) {
|
||||
function click(data) {
|
||||
self.options.position = Ox.round(Ox.limit(
|
||||
getPosition(e), 0, self.options.duration
|
||||
getPosition(data), 0, self.options.duration
|
||||
), 3);
|
||||
setPosition();
|
||||
triggerPositionEvent();
|
||||
}
|
||||
|
||||
function dragstart(event, e) {
|
||||
self.drag = {x: e.clientX};
|
||||
function dragstart(data) {
|
||||
self.drag = {x: data.clientX};
|
||||
}
|
||||
|
||||
function drag(event, e) {
|
||||
function drag(data) {
|
||||
self.options.position = Ox.round(Ox.limit(
|
||||
self.options.position + (self.drag.x - e.clientX) / self.fps,
|
||||
self.options.position + (self.drag.x - data.clientX) / self.fps,
|
||||
0, self.options.duration
|
||||
), 3);
|
||||
self.drag.x = e.clientX;
|
||||
self.drag.x = data.clientX;
|
||||
setPosition();
|
||||
triggerPositionEvent();
|
||||
}
|
||||
|
|
|
|||
|
|
@ -29,8 +29,8 @@ Ox.SmallTimeline = function(options, self) {
|
|||
.mouseleave(mouseleave)
|
||||
.mousemove(mousemove)
|
||||
.bindEvent({
|
||||
drag: function(event, e) {
|
||||
mousedown(e);
|
||||
drag: function(data) {
|
||||
mousedown(data);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -55,12 +55,12 @@ Ox.SmallVideoTimeline = function(options, self) {
|
|||
mousedown: mousedown
|
||||
})
|
||||
.bindEvent({
|
||||
drag: function(event, e) {
|
||||
mousedown(e);
|
||||
drag: function(data) {
|
||||
mousedown(data);
|
||||
},
|
||||
dragend: function(event, e) {
|
||||
dragend: function(data) {
|
||||
self.triggered = false;
|
||||
mousedown(e);
|
||||
mousedown(data);
|
||||
}
|
||||
})
|
||||
.appendTo(that);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue