File tree 1 file changed +3
-5
lines changed 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -640,8 +640,8 @@ export default function sortableContainer(
640
640
for ( let i = 0 , len = nodes . length ; i < len ; i ++ ) {
641
641
const { node} = nodes [ i ] ;
642
642
const { index} = node . sortableInfo ;
643
- const width = node . offsetWidth ;
644
- const height = node . offsetHeight ;
643
+ const width = node . getBoundingClientRect ( ) . width ;
644
+ const height = node . getBoundingClientRect ( ) . height ;
645
645
const offset = {
646
646
height : this . height > height ? height / 2 : this . height / 2 ,
647
647
width : this . width > width ? width / 2 : this . width / 2 ,
@@ -793,9 +793,7 @@ export default function sortableContainer(
793
793
} else if ( this . axis . y ) {
794
794
if (
795
795
mustShiftBackward ||
796
- ( index > this . index &&
797
- sortingOffset . top + windowScrollDelta . top + offset . height >=
798
- edgeOffset . top )
796
+ ( index > this . index && sortingOffset . top + windowScrollDelta . top + this . boundingClientRect . height >= edgeOffset . top + offset . height )
799
797
) {
800
798
translate . y = - ( this . height + this . marginOffset . y ) ;
801
799
this . newIndex = index ;
You can’t perform that action at this time.
0 commit comments