| @@ 347-394 (lines=48) @@ | ||
| 344 | } |
|
| 345 | ||
| 346 | //Do scrolling |
|
| 347 | if ( this.options.scroll ) { |
|
| 348 | if ( this.scrollParent[ 0 ] !== this.document[ 0 ] && |
|
| 349 | this.scrollParent[ 0 ].tagName !== "HTML" ) { |
|
| 350 | ||
| 351 | if ( ( this.overflowOffset.top + this.scrollParent[ 0 ].offsetHeight ) - |
|
| 352 | event.pageY < o.scrollSensitivity ) { |
|
| 353 | this.scrollParent[ 0 ].scrollTop = |
|
| 354 | scrolled = this.scrollParent[ 0 ].scrollTop + o.scrollSpeed; |
|
| 355 | } else if ( event.pageY - this.overflowOffset.top < o.scrollSensitivity ) { |
|
| 356 | this.scrollParent[ 0 ].scrollTop = |
|
| 357 | scrolled = this.scrollParent[ 0 ].scrollTop - o.scrollSpeed; |
|
| 358 | } |
|
| 359 | ||
| 360 | if ( ( this.overflowOffset.left + this.scrollParent[ 0 ].offsetWidth ) - |
|
| 361 | event.pageX < o.scrollSensitivity ) { |
|
| 362 | this.scrollParent[ 0 ].scrollLeft = scrolled = |
|
| 363 | this.scrollParent[ 0 ].scrollLeft + o.scrollSpeed; |
|
| 364 | } else if ( event.pageX - this.overflowOffset.left < o.scrollSensitivity ) { |
|
| 365 | this.scrollParent[ 0 ].scrollLeft = scrolled = |
|
| 366 | this.scrollParent[ 0 ].scrollLeft - o.scrollSpeed; |
|
| 367 | } |
|
| 368 | ||
| 369 | } else { |
|
| 370 | ||
| 371 | if ( event.pageY - this.document.scrollTop() < o.scrollSensitivity ) { |
|
| 372 | scrolled = this.document.scrollTop( this.document.scrollTop() - o.scrollSpeed ); |
|
| 373 | } else if ( this.window.height() - ( event.pageY - this.document.scrollTop() ) < |
|
| 374 | o.scrollSensitivity ) { |
|
| 375 | scrolled = this.document.scrollTop( this.document.scrollTop() + o.scrollSpeed ); |
|
| 376 | } |
|
| 377 | ||
| 378 | if ( event.pageX - this.document.scrollLeft() < o.scrollSensitivity ) { |
|
| 379 | scrolled = this.document.scrollLeft( |
|
| 380 | this.document.scrollLeft() - o.scrollSpeed |
|
| 381 | ); |
|
| 382 | } else if ( this.window.width() - ( event.pageX - this.document.scrollLeft() ) < |
|
| 383 | o.scrollSensitivity ) { |
|
| 384 | scrolled = this.document.scrollLeft( |
|
| 385 | this.document.scrollLeft() + o.scrollSpeed |
|
| 386 | ); |
|
| 387 | } |
|
| 388 | ||
| 389 | } |
|
| 390 | ||
| 391 | if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) { |
|
| 392 | $.ui.ddmanager.prepareOffsets( this, event ); |
|
| 393 | } |
|
| 394 | } |
|
| 395 | ||
| 396 | //Regenerate the absolute position used for position checks |
|
| 397 | this.positionAbs = this._convertPositionTo( "absolute" ); |
|
| @@ 1027-1070 (lines=44) @@ | ||
| 1024 | scrollParent = i.scrollParentNotHidden[ 0 ], |
|
| 1025 | document = i.document[ 0 ]; |
|
| 1026 | ||
| 1027 | if ( scrollParent !== document && scrollParent.tagName !== "HTML" ) { |
|
| 1028 | if ( !o.axis || o.axis !== "x" ) { |
|
| 1029 | if ( ( i.overflowOffset.top + scrollParent.offsetHeight ) - event.pageY < |
|
| 1030 | o.scrollSensitivity ) { |
|
| 1031 | scrollParent.scrollTop = scrolled = scrollParent.scrollTop + o.scrollSpeed; |
|
| 1032 | } else if ( event.pageY - i.overflowOffset.top < o.scrollSensitivity ) { |
|
| 1033 | scrollParent.scrollTop = scrolled = scrollParent.scrollTop - o.scrollSpeed; |
|
| 1034 | } |
|
| 1035 | } |
|
| 1036 | ||
| 1037 | if ( !o.axis || o.axis !== "y" ) { |
|
| 1038 | if ( ( i.overflowOffset.left + scrollParent.offsetWidth ) - event.pageX < |
|
| 1039 | o.scrollSensitivity ) { |
|
| 1040 | scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft + o.scrollSpeed; |
|
| 1041 | } else if ( event.pageX - i.overflowOffset.left < o.scrollSensitivity ) { |
|
| 1042 | scrollParent.scrollLeft = scrolled = scrollParent.scrollLeft - o.scrollSpeed; |
|
| 1043 | } |
|
| 1044 | } |
|
| 1045 | ||
| 1046 | } else { |
|
| 1047 | ||
| 1048 | if ( !o.axis || o.axis !== "x" ) { |
|
| 1049 | if ( event.pageY - $( document ).scrollTop() < o.scrollSensitivity ) { |
|
| 1050 | scrolled = $( document ).scrollTop( $( document ).scrollTop() - o.scrollSpeed ); |
|
| 1051 | } else if ( $( window ).height() - ( event.pageY - $( document ).scrollTop() ) < |
|
| 1052 | o.scrollSensitivity ) { |
|
| 1053 | scrolled = $( document ).scrollTop( $( document ).scrollTop() + o.scrollSpeed ); |
|
| 1054 | } |
|
| 1055 | } |
|
| 1056 | ||
| 1057 | if ( !o.axis || o.axis !== "y" ) { |
|
| 1058 | if ( event.pageX - $( document ).scrollLeft() < o.scrollSensitivity ) { |
|
| 1059 | scrolled = $( document ).scrollLeft( |
|
| 1060 | $( document ).scrollLeft() - o.scrollSpeed |
|
| 1061 | ); |
|
| 1062 | } else if ( $( window ).width() - ( event.pageX - $( document ).scrollLeft() ) < |
|
| 1063 | o.scrollSensitivity ) { |
|
| 1064 | scrolled = $( document ).scrollLeft( |
|
| 1065 | $( document ).scrollLeft() + o.scrollSpeed |
|
| 1066 | ); |
|
| 1067 | } |
|
| 1068 | } |
|
| 1069 | ||
| 1070 | } |
|
| 1071 | ||
| 1072 | if ( scrolled !== false && $.ui.ddmanager && !o.dropBehaviour ) { |
|
| 1073 | $.ui.ddmanager.prepareOffsets( i, event ); |
|