mirror of
https://github.com/jquery/jquery-ui.git
synced 2024-11-21 11:04:24 +00:00
Draggable: clean up whitespace in scroll option
This commit is contained in:
parent
e9efbc2221
commit
be4c0fc324
@ -838,19 +838,19 @@ $.ui.plugin.add("draggable", "scroll", {
|
|||||||
document = i.document[ 0 ];
|
document = i.document[ 0 ];
|
||||||
|
|
||||||
if ( i.scrollParent[ 0 ] !== document && i.scrollParent[ 0 ].tagName !== "HTML" ) {
|
if ( i.scrollParent[ 0 ] !== document && i.scrollParent[ 0 ].tagName !== "HTML" ) {
|
||||||
if (!o.axis || o.axis !== "x") {
|
if ( !o.axis || o.axis !== "x" ) {
|
||||||
if ((i.overflowOffset.top + i.scrollParent[0].offsetHeight) - event.pageY < o.scrollSensitivity) {
|
if ( ( i.overflowOffset.top + i.scrollParent[ 0 ].offsetHeight ) - event.pageY < o.scrollSensitivity ) {
|
||||||
i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop + o.scrollSpeed;
|
i.scrollParent[ 0 ].scrollTop = scrolled = i.scrollParent[ 0 ].scrollTop + o.scrollSpeed;
|
||||||
} else if (event.pageY - i.overflowOffset.top < o.scrollSensitivity) {
|
} else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) {
|
||||||
i.scrollParent[0].scrollTop = scrolled = i.scrollParent[0].scrollTop - o.scrollSpeed;
|
i.scrollParent[ 0 ].scrollTop = scrolled = i.scrollParent[ 0 ].scrollTop - o.scrollSpeed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!o.axis || o.axis !== "y") {
|
if ( !o.axis || o.axis !== "y" ) {
|
||||||
if ((i.overflowOffset.left + i.scrollParent[0].offsetWidth) - event.pageX < o.scrollSensitivity) {
|
if ( ( i.overflowOffset.left + i.scrollParent[ 0 ].offsetWidth ) - event.pageX < o.scrollSensitivity ) {
|
||||||
i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft + o.scrollSpeed;
|
i.scrollParent[ 0 ].scrollLeft = scrolled = i.scrollParent[ 0 ].scrollLeft + o.scrollSpeed;
|
||||||
} else if (event.pageX - i.overflowOffset.left < o.scrollSensitivity) {
|
} else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) {
|
||||||
i.scrollParent[0].scrollLeft = scrolled = i.scrollParent[0].scrollLeft - o.scrollSpeed;
|
i.scrollParent[ 0 ].scrollLeft = scrolled = i.scrollParent[ 0 ].scrollLeft - o.scrollSpeed;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user