Skip to content
Snippets Groups Projects
Unverified Commit 9e3ad1d8 authored by Alexis BENOIT's avatar Alexis BENOIT Committed by GitHub
Browse files

Slider : correction du drag'n'drop (#745)

parent 289fe914
No related branches found
No related tags found
No related merge requests found
......@@ -120,27 +120,26 @@ osuny.TouchControl.prototype.onEnd = function (event) {
}
this.dispatch(event);
this.clear();
};
osuny.TouchControl.prototype.dispatch = function (event) {
var threshold = this.options.threshold.action;
this.state.end = osuny.utils.getEventClientCoord(event);
if (this.state.start.x > this.state.end.x + threshold) {
this.parent.next();
} else if (this.state.start.x < this.state.end.x - threshold) {
this.parent.previous();
}
this.clear();
if (this.parent['release']) {
this.parent.release();
}
};
osuny.TouchControl.prototype.preventClicks = function (event) {
if (this.state.shouldPreventClicks && event.type === 'click') {
event.preventDefault();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment