Browse Source

Use correct tolerance

Tobias Reich 11 years ago
parent
commit
541130483b
2 changed files with 3 additions and 3 deletions
  1. 0 0
      assets/build/main.js
  2. 3 3
      assets/js/swipe.js

File diff suppressed because it is too large
+ 0 - 0
assets/build/main.js


+ 3 - 3
assets/js/swipe.js

@@ -26,7 +26,7 @@ swipe = {
 
 		console.log(e);
 
-		offset = -1 * e.x;
+		swipe.offset = -1 * e.x;
 
 		swipe.obj.css({
 			WebkitTransform: 'translateX(' + offset + 'px)',
@@ -40,8 +40,8 @@ swipe = {
 
 		console.log('stop with ' + e.x);
 
-		if (e.x<=-150) left();
-		else if (e.x>=150) right();
+		if (e.x<=-swipe.tolerance) left();
+		else if (e.x>=swipe.tolerance) right();
 		else {
 			console.log('reset');
 			swipe.obj.css({

Some files were not shown because too many files changed in this diff