forked from 0x2620/oxjs
some bugfixes
This commit is contained in:
parent
4cc754a28d
commit
ef1fa5fe84
14 changed files with 228 additions and 229 deletions
|
|
@ -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();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue