Permalink
Browse files

1.5.1

  • Loading branch information...
1 parent f260262 commit 1ed99ab6113bfeb3a4dfc973f7af775e92d64e9c Jonathan Azoff committed Nov 25, 2011
Showing with 28 additions and 26 deletions.
  1. +16 −14 jquery.overscroll.js
  2. +12 −12 jquery.overscroll.min.js
View
@@ -52,7 +52,7 @@
wheel: "mousewheel DOMMouseScroll",
start: "mousedown",
drag: "mousemove",
- end: "mouseup mouseleave",
+ end: "mouseup mouseleave click",
ignored: "select dragstart drag"
},
@@ -143,19 +143,19 @@
target.prepend(data.thumbs.vertical);
}
- }
-
- // if scroll offsets are defined, apply them here
- if (options.scrollLeft) {
- target.scrollLeft(options.scrollLeft);
- }
- if (options.scrollTop) {
- target.scrollTop(options.scrollTop);
- }
-
- o.moveThumbs(data, target.scrollLeft(), target.scrollTop());
+ }
}
+
+ // if scroll offsets are defined, apply them here
+ if (options.scrollLeft) {
+ target.scrollLeft(options.scrollLeft);
+ }
+ if (options.scrollTop) {
+ target.scrollTop(options.scrollTop);
+ }
+
+ o.moveThumbs(data, target.scrollLeft(), target.scrollTop());
},
@@ -322,6 +322,8 @@
// updates the current scroll location during a mouse move
drag: function (event) {
+ event.preventDefault();
+
var data = event.data, flags = data.flags;
if (!flags.dragged) {
@@ -372,9 +374,9 @@
var data = event.data, target = data.target, flags = data.flags;
- if (data.position) {
+ target.unbind(o.events.drag, o.drag);
- target.unbind(o.events.drag, o.drag);
+ if (data.position) {
o.triggerEvent('dragend', data);
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit 1ed99ab

Please sign in to comment.