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) => {
7878
7979 // init scroller
8080 const scrollContainer = getScrollingParent ( containerElement ) || containerElement ;
81+ const initScroll : Axis = {
82+ x : scrollContainer . scrollLeft ,
83+ y : scrollContainer . scrollTop
84+ } ;
8185 const autoScroller = new AutoScroller ( scrollContainer , ( offset : Offset ) => {
8286 activeNodeHolderTranslate . x += offset . left ;
8387 activeNodeHolderTranslate . y += offset . top ;
@@ -99,8 +103,8 @@ const useSortHelper = (config: SortConfig) => {
99103 document . body . appendChild ( activeNodeHelper ) ;
100104
101105 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
104108 } ) ;
105109 const getHolderTranslate = ( ) : Axis =>
106110 animatedNodesOffset . reduce (
You can’t perform that action at this time.
0 commit comments