File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -78,6 +78,10 @@ const useSortHelper = (config: SortConfig) => {
78
78
79
79
// init scroller
80
80
const scrollContainer = getScrollingParent ( containerElement ) || containerElement ;
81
+ const initScroll : Axis = {
82
+ x : scrollContainer . scrollLeft ,
83
+ y : scrollContainer . scrollTop
84
+ } ;
81
85
const autoScroller = new AutoScroller ( scrollContainer , ( offset : Offset ) => {
82
86
activeNodeHolderTranslate . x += offset . left ;
83
87
activeNodeHolderTranslate . y += offset . top ;
@@ -99,8 +103,8 @@ const useSortHelper = (config: SortConfig) => {
99
103
document . body . appendChild ( activeNodeHelper ) ;
100
104
101
105
const getContainerScrollDelta = ( ) : Offset => ( {
102
- left : scrollContainer . scrollLeft - scrollContainer . scrollLeft ,
103
- top : scrollContainer . scrollTop - scrollContainer . scrollTop
106
+ left : scrollContainer . scrollLeft - initScroll . x ,
107
+ top : scrollContainer . scrollTop - initScroll . y
104
108
} ) ;
105
109
const getHolderTranslate = ( ) : Axis =>
106
110
animatedNodesOffset . reduce (
You can’t perform that action at this time.
0 commit comments