1
0
Fork 0
forked from 0x2620/oxjs

some bugfixes

This commit is contained in:
rlx 2011-09-17 11:49:29 +00:00
commit ef1fa5fe84
14 changed files with 228 additions and 229 deletions

View file

@ -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);
}
});

View file

@ -26,8 +26,8 @@ Ox.BlockVideoTimeline = function(options, self) {
mousemove: mousemove
})
.bindEvent({
drag: function(event, e) {
mousedown(e);
drag: function(data) {
mousedown(data);
}
});

View file

@ -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();
}

View file

@ -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();
}

View file

@ -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);
}
});

View file

@ -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);