From ea80b79436da9fca43887e3cfa0ddee70ce63e96 Mon Sep 17 00:00:00 2001 From: annmirosh Date: Tue, 17 Jun 2014 22:25:47 +0600 Subject: [PATCH] LastY variable was added to settings --- hook.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/hook.js b/hook.js index d109710..9b008a3 100644 --- a/hook.js +++ b/hook.js @@ -47,6 +47,7 @@ textRequired: false, // will input loader text if true scrollWheelSelected: false, // will use scroll wheel events swipeDistance: 50, // swipe distance for loader to show on touch devices + lastYDistance: 40, // minimum Y coordinate for triggering reloading on touch devices loaderClass: 'hook-loader', spinnerClass: 'hook-spinner', loaderTextClass: 'hook-text', @@ -102,7 +103,7 @@ e.preventDefault(); } - if(swipe > settings.swipeDistance && lastY <= 40) { + if(swipe > settings.swipeDistance && lastY <= settings.lastYDistance) { methods.onSwipe($this, settings); } });