Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LastY variable was added to settings #23

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion hook.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -102,7 +103,7 @@
e.preventDefault();
}

if(swipe > settings.swipeDistance && lastY <= 40) {
if(swipe > settings.swipeDistance && lastY <= settings.lastYDistance) {
methods.onSwipe($this, settings);
}
});
Expand Down