File tree Expand file tree Collapse file tree 1 file changed +3
-11
lines changed
Expand file tree Collapse file tree 1 file changed +3
-11
lines changed Original file line number Diff line number Diff line change @@ -175,20 +175,12 @@ export class DraggingPositionEvaluation {
175175 if ( ! priorItem || priorItem ?. depth === undefined ) return ;
176176
177177 const depthDistanceToPrior = priorItem . depth - this . targetItem . depth ;
178+
178179 if (
179180 this . offset === 'top' &&
180- this . targetItem . depth === ( priorItem ?. depth ?? - 1 )
181- ) {
182- // map inside folder
183- this . offset = 'bottom' ;
184- this . linearIndex -= 1 ;
185- this . targetItem = this . env . linearItems [ this . treeId ] [ this . linearIndex ] ;
186- } else if (
187- this . offset === 'top' &&
188- depthDistanceToPrior > 0 &&
189- this . indentation !== undefined
181+ ( depthDistanceToPrior === 0 ||
182+ ( depthDistanceToPrior > 0 && this . indentation !== undefined ) )
190183 ) {
191- // map at bottom of folder, up inside folder contents
192184 this . offset = 'bottom' ;
193185 this . linearIndex -= 1 ;
194186 this . targetItem = this . env . linearItems [ this . treeId ] [ this . linearIndex ] ;
You can’t perform that action at this time.
0 commit comments