diff --git a/app/assets/javascripts/posts.js b/app/assets/javascripts/posts.js index e8ff761bd..b65bdc9cb 100644 --- a/app/assets/javascripts/posts.js +++ b/app/assets/javascripts/posts.js @@ -56,13 +56,13 @@ $("body").hammer().bind("panend", function(e) { var percentage = e.gesture.deltaX / window.innerWidth; - var swipe = Math.abs(e.gesture.velocityX) > 0.5; + var swipe = Math.abs(e.gesture.velocityX) > 0.6; if (Math.abs(e.gesture.deltaY) > 75) { return; - } else if ((percentage > 0.3 || (percentage > 0.1 && swipe)) && hasPrev) { + } else if ((percentage > 0.4 || (percentage > 0.1 && swipe)) && hasPrev) { $("body").css({"transition-timing-function": "ease", "transition-duration": "0.3s", "opacity": "0", "transform": "translateX(150%)"}); $.timeout(300).done(function() {Danbooru.Post.swipe_prev(e)}); - } else if ((percentage < -0.3 || (percentage < -0.1 && swipe)) && hasNext) { + } else if ((percentage < -0.4 || (percentage < -0.1 && swipe)) && hasNext) { $("body").css({"transition-timing-function": "ease", "transition-duration": "0.3s", "opacity": "0", "transform": "translateX(-150%)"}); $.timeout(300).done(function() {Danbooru.Post.swipe_next(e)}); }