diff --git a/README.md b/README.md index f40ba69..1ebd739 100644 --- a/README.md +++ b/README.md @@ -73,6 +73,7 @@ jQuery.fn.overscroll.settings = { thumbOpacity: 0.7, // The default active opacity for the thumbs thumbThickness: 6, // The thickness, in pixels, of the generated thumbs thumbTimeout: 400, // The amount of time to wait before fading out thumbs + draggingTimeout: 100, // The amount of time to wait before resetting the dragging flag back to false after stop dragging (useful when detecting dragging in onClick events) } ``` diff --git a/dist/jquery.overscroll.js b/dist/jquery.overscroll.js index 8bc9662..c27b2b1 100644 --- a/dist/jquery.overscroll.js +++ b/dist/jquery.overscroll.js @@ -48,6 +48,7 @@ thumbOpacity: 0.7, thumbThickness: 6, thumbTimeout: 400, + draggingTimeout: 100, wheelDelta: 20, wheelTicks: 120 }; @@ -519,12 +520,13 @@ } // clear all internal flags and settings - target.data(datakey).dragging = + setTimeout(function() { target.data(datakey).dragging = data.start = data.capture = data.position = flags.dragged = flags.dragging = false; + }, settings.draggingTimeout); // set the cursor back to normal target.css('cursor', compat().cursor.grab);