Skip to content

Commit

Permalink
Patch for issue #33
Browse files Browse the repository at this point in the history
Allow vertical page scrolling whilst touching widget
  • Loading branch information
dayoweb committed Apr 9, 2013
1 parent 903a07c commit f5aee67
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions jquery.kinetic.js
Original file line number Diff line number Diff line change
Expand Up @@ -291,6 +291,12 @@
}
}
}

if (!settings.y && settings.velocity < 5 && settings.velocityY > 5) {
return false;
}

return true;
};

// Events
Expand All @@ -307,8 +313,9 @@
var touch;
if (mouseDown) {
touch = e.originalEvent.touches[0];
inputmove(touch.clientX, touch.clientY);
if (e.preventDefault) {e.preventDefault();}
if (inputmove(touch.clientX, touch.clientY)) {
if (e.preventDefault) { e.preventDefault(); }
}
}
},
inputDown: function(e){
Expand All @@ -328,8 +335,11 @@
},
inputMove: function(e) {
if (mouseDown){
inputmove(e.clientX, e.clientY);
if (e.preventDefault) {e.preventDefault();}
if (inputmove(e.clientX, e.clientY)) {
if (e.preventDefault) {
e.preventDefault();
}
}
}
},
scroll: function(e) {
Expand Down

0 comments on commit f5aee67

Please sign in to comment.