aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorMike Sherov <mike.sherov@gmail.com>2014-08-09 23:06:18 -0400
committerMike Sherov <mike.sherov@gmail.com>2014-08-12 19:30:09 -0400
commitbe4c0fc3240fb945ed0311f82f6d2adf1b8f4dd0 (patch)
tree0a4fd3ca14454231434a1bb53292d247648226ee /ui
parente9efbc222149ca7c7a5fef2c0fe28b7b1d9be698 (diff)
downloadjquery-ui-be4c0fc3240fb945ed0311f82f6d2adf1b8f4dd0.tar.gz
jquery-ui-be4c0fc3240fb945ed0311f82f6d2adf1b8f4dd0.zip
Draggable: clean up whitespace in scroll option
Diffstat (limited to 'ui')
-rw-r--r--ui/draggable.js20
1 files changed, 10 insertions, 10 deletions
diff --git a/ui/draggable.js b/ui/draggable.js
index 0c57d801c..2f91f2ea2 100644
--- a/ui/draggable.js
+++ b/ui/draggable.js
@@ -838,19 +838,19 @@ $.ui.plugin.add("draggable", "scroll", {
document = i.document[ 0 ];
if ( i.scrollParent[ 0 ] !== document && i.scrollParent[ 0 ].tagName !== "HTML" ) {
- if (!o.axis || o.axis !== "x") {
- if ((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
- i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
- } else if (event.pageY - i.overflowOffset.top < o.scrollSensitivity) {
- i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
+ if ( !o.axis || o.axis !== "x" ) {
+ if ( ( i.overflowOffset.top + i.scrollParent[ 0 ].offsetHeight ) - event.pageY < o.scrollSensitivity ) {
+ i.scrollParent[ 0 ].scrollTop = scrolled = i.scrollParent[ 0 ].scrollTop + o.scrollSpeed;
+ } else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
+ i.scrollParent[ 0 ].scrollTop = scrolled = i.scrollParent[ 0 ].scrollTop - o.scrollSpeed;
}
}
- if (!o.axis || o.axis !== "y") {
- if ((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
- i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
- } else if (event.pageX - i.overflowOffset.left < o.scrollSensitivity) {
- i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
+ if ( !o.axis || o.axis !== "y" ) {
+ if ( ( i.overflowOffset.left + i.scrollParent[ 0 ].offsetWidth ) - event.pageX < o.scrollSensitivity ) {
+ i.scrollParent[ 0 ].scrollLeft = scrolled = i.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;
+ } else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
+ i.scrollParent[ 0 ].scrollLeft = scrolled = i.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;
}
}