@@ -1169,7 +1169,7 @@ Sortable.prototype = /** @lends Sortable.prototype */ {
11691169 }
11701170
11711171 direction = _getSwapDirection (
1172- evt , target , vertical ,
1172+ evt , target , targetRect , vertical ,
11731173 differentRowCol ? 1 : options . swapThreshold ,
11741174 options . invertedSwapThreshold == null ? options . swapThreshold : options . invertedSwapThreshold ,
11751175 isCircumstantialInvert ,
@@ -1721,9 +1721,8 @@ function _ghostIsLast(evt, vertical, sortable) {
17211721 ( evt . clientX > rect . right && evt . clientY > rect . top || evt . clientX <= rect . right && evt . clientY > rect . bottom + spacer ) ;
17221722}
17231723
1724- function _getSwapDirection ( evt , target , vertical , swapThreshold , invertedSwapThreshold , invertSwap , isLastTarget ) {
1725- let targetRect = getRect ( target ) ,
1726- mouseOnAxis = vertical ? evt . clientY : evt . clientX ,
1724+ function _getSwapDirection ( evt , target , targetRect , vertical , swapThreshold , invertedSwapThreshold , invertSwap , isLastTarget ) {
1725+ let mouseOnAxis = vertical ? evt . clientY : evt . clientX ,
17271726 targetLength = vertical ? targetRect . height : targetRect . width ,
17281727 targetS1 = vertical ? targetRect . top : targetRect . left ,
17291728 targetS2 = vertical ? targetRect . bottom : targetRect . right ,
0 commit comments