Use correct tolerance
This commit is contained in:
parent
749c2cd9ab
commit
541130483b
File diff suppressed because one or more lines are too long
@ -26,7 +26,7 @@ swipe = {
|
|||||||
|
|
||||||
console.log(e);
|
console.log(e);
|
||||||
|
|
||||||
offset = -1 * e.x;
|
swipe.offset = -1 * e.x;
|
||||||
|
|
||||||
swipe.obj.css({
|
swipe.obj.css({
|
||||||
WebkitTransform: 'translateX(' + offset + 'px)',
|
WebkitTransform: 'translateX(' + offset + 'px)',
|
||||||
@ -40,8 +40,8 @@ swipe = {
|
|||||||
|
|
||||||
console.log('stop with ' + e.x);
|
console.log('stop with ' + e.x);
|
||||||
|
|
||||||
if (e.x<=-150) left();
|
if (e.x<=-swipe.tolerance) left();
|
||||||
else if (e.x>=150) right();
|
else if (e.x>=swipe.tolerance) right();
|
||||||
else {
|
else {
|
||||||
console.log('reset');
|
console.log('reset');
|
||||||
swipe.obj.css({
|
swipe.obj.css({
|
||||||
|
Loading…
Reference in New Issue
Block a user