@@ -294,8 +294,8 @@ $.widget("ui.sortable", $.ui.mouse, {
294
294
295
295
if ( itemElement != this . currentItem [ 0 ] //cannot intersect with itself
296
296
&& this . placeholder [ intersection == 1 ? "next" : "prev" ] ( ) [ 0 ] != itemElement //no useless actions that have been done before
297
- && ! $ . ui . contains ( this . placeholder [ 0 ] , itemElement ) //no action if the item moved is the parent of the item checked
298
- && ( this . options . type == 'semi-dynamic' ? ! $ . ui . contains ( this . element [ 0 ] , itemElement ) : true )
297
+ && ! $ . contains ( this . placeholder [ 0 ] , itemElement ) //no action if the item moved is the parent of the item checked
298
+ && ( this . options . type == 'semi-dynamic' ? ! $ . contains ( this . element [ 0 ] , itemElement ) : true )
299
299
//&& itemElement.parentNode == this.placeholder[0].parentNode // only rearrange items within the same container
300
300
) {
301
301
@@ -691,13 +691,13 @@ $.widget("ui.sortable", $.ui.mouse, {
691
691
for ( var i = this . containers . length - 1 ; i >= 0 ; i -- ) {
692
692
693
693
// never consider a container that's located within the item itself
694
- if ( $ . ui . contains ( this . currentItem [ 0 ] , this . containers [ i ] . element [ 0 ] ) )
694
+ if ( $ . contains ( this . currentItem [ 0 ] , this . containers [ i ] . element [ 0 ] ) )
695
695
continue ;
696
696
697
697
if ( this . _intersectsWith ( this . containers [ i ] . containerCache ) ) {
698
698
699
699
// if we've already found a container and it's more "inner" than this, then continue
700
- if ( innermostContainer && $ . ui . contains ( this . containers [ i ] . element [ 0 ] , innermostContainer . element [ 0 ] ) )
700
+ if ( innermostContainer && $ . contains ( this . containers [ i ] . element [ 0 ] , innermostContainer . element [ 0 ] ) )
701
701
continue ;
702
702
703
703
innermostContainer = this . containers [ i ] ;
@@ -725,7 +725,7 @@ $.widget("ui.sortable", $.ui.mouse, {
725
725
//When entering a new container, we will find the item with the least distance and append our item near it
726
726
var dist = 10000 ; var itemWithLeastDistance = null ; var base = this . positionAbs [ this . containers [ innermostIndex ] . floating ? 'left' : 'top' ] ;
727
727
for ( var j = this . items . length - 1 ; j >= 0 ; j -- ) {
728
- if ( ! $ . ui . contains ( this . containers [ innermostIndex ] . element [ 0 ] , this . items [ j ] . item [ 0 ] ) ) continue ;
728
+ if ( ! $ . contains ( this . containers [ innermostIndex ] . element [ 0 ] , this . items [ j ] . item [ 0 ] ) ) continue ;
729
729
var cur = this . items [ j ] [ this . containers [ innermostIndex ] . floating ? 'left' : 'top' ] ;
730
730
if ( Math . abs ( cur - base ) < dist ) {
731
731
dist = Math . abs ( cur - base ) ; itemWithLeastDistance = this . items [ j ] ;
@@ -800,7 +800,7 @@ $.widget("ui.sortable", $.ui.mouse, {
800
800
// 1. The position of the helper is absolute, so it's position is calculated based on the next positioned parent
801
801
// 2. The actual offset parent is a child of the scroll parent, and the scroll parent isn't the document, which means that
802
802
// the scroll is included in the initial calculation of the offset of the parent, and never recalculated upon drag
803
- if ( this . cssPosition == 'absolute' && this . scrollParent [ 0 ] != document && $ . ui . contains ( this . scrollParent [ 0 ] , this . offsetParent [ 0 ] ) ) {
803
+ if ( this . cssPosition == 'absolute' && this . scrollParent [ 0 ] != document && $ . contains ( this . scrollParent [ 0 ] , this . offsetParent [ 0 ] ) ) {
804
804
po . left += this . scrollParent . scrollLeft ( ) ;
805
805
po . top += this . scrollParent . scrollTop ( ) ;
806
806
}
@@ -874,7 +874,7 @@ $.widget("ui.sortable", $.ui.mouse, {
874
874
875
875
if ( ! pos ) pos = this . position ;
876
876
var mod = d == "absolute" ? 1 : - 1 ;
877
- var o = this . options , scroll = this . cssPosition == 'absolute' && ! ( this . scrollParent [ 0 ] != document && $ . ui . contains ( this . scrollParent [ 0 ] , this . offsetParent [ 0 ] ) ) ? this . offsetParent : this . scrollParent , scrollIsRootNode = ( / ( h t m l | b o d y ) / i) . test ( scroll [ 0 ] . tagName ) ;
877
+ var o = this . options , scroll = this . cssPosition == 'absolute' && ! ( this . scrollParent [ 0 ] != document && $ . contains ( this . scrollParent [ 0 ] , this . offsetParent [ 0 ] ) ) ? this . offsetParent : this . scrollParent , scrollIsRootNode = ( / ( h t m l | b o d y ) / i) . test ( scroll [ 0 ] . tagName ) ;
878
878
879
879
return {
880
880
top : (
@@ -895,7 +895,7 @@ $.widget("ui.sortable", $.ui.mouse, {
895
895
896
896
_generatePosition : function ( event ) {
897
897
898
- var o = this . options , scroll = this . cssPosition == 'absolute' && ! ( this . scrollParent [ 0 ] != document && $ . ui . contains ( this . scrollParent [ 0 ] , this . offsetParent [ 0 ] ) ) ? this . offsetParent : this . scrollParent , scrollIsRootNode = ( / ( h t m l | b o d y ) / i) . test ( scroll [ 0 ] . tagName ) ;
898
+ var o = this . options , scroll = this . cssPosition == 'absolute' && ! ( this . scrollParent [ 0 ] != document && $ . contains ( this . scrollParent [ 0 ] , this . offsetParent [ 0 ] ) ) ? this . offsetParent : this . scrollParent , scrollIsRootNode = ( / ( h t m l | b o d y ) / i) . test ( scroll [ 0 ] . tagName ) ;
899
899
900
900
// This is another very weird special case that only happens for relative elements:
901
901
// 1. If the css position is relative
@@ -992,10 +992,10 @@ $.widget("ui.sortable", $.ui.mouse, {
992
992
993
993
if ( this . fromOutside && ! noPropagation ) delayedTriggers . push ( function ( event ) { this . _trigger ( "receive" , event , this . _uiHash ( this . fromOutside ) ) ; } ) ;
994
994
if ( ( this . fromOutside || this . domPosition . prev != this . currentItem . prev ( ) . not ( ".ui-sortable-helper" ) [ 0 ] || this . domPosition . parent != this . currentItem . parent ( ) [ 0 ] ) && ! noPropagation ) delayedTriggers . push ( function ( event ) { this . _trigger ( "update" , event , this . _uiHash ( ) ) ; } ) ; //Trigger update callback if the DOM position has changed
995
- if ( ! $ . ui . contains ( this . element [ 0 ] , this . currentItem [ 0 ] ) ) { //Node was moved out of the current element
995
+ if ( ! $ . contains ( this . element [ 0 ] , this . currentItem [ 0 ] ) ) { //Node was moved out of the current element
996
996
if ( ! noPropagation ) delayedTriggers . push ( function ( event ) { this . _trigger ( "remove" , event , this . _uiHash ( ) ) ; } ) ;
997
997
for ( var i = this . containers . length - 1 ; i >= 0 ; i -- ) {
998
- if ( $ . ui . contains ( this . containers [ i ] . element [ 0 ] , this . currentItem [ 0 ] ) && ! noPropagation ) {
998
+ if ( $ . contains ( this . containers [ i ] . element [ 0 ] , this . currentItem [ 0 ] ) && ! noPropagation ) {
999
999
delayedTriggers . push ( ( function ( c ) { return function ( event ) { c . _trigger ( "receive" , event , this . _uiHash ( this ) ) ; } ; } ) . call ( this , this . containers [ i ] ) ) ;
1000
1000
delayedTriggers . push ( ( function ( c ) { return function ( event ) { c . _trigger ( "update" , event , this . _uiHash ( this ) ) ; } ; } ) . call ( this , this . containers [ i ] ) ) ;
1001
1001
}
0 commit comments