fix sorting tree condition
This commit is contained in:
parent
ae107dc0d1
commit
71e2ef65fc
@ -743,8 +743,9 @@ export class SortingTreeComponent<T extends Identifiable & Displayable> implemen
|
||||
}
|
||||
|
||||
// Check if the neighbor below has a level equals to two or more higher than the moved node.
|
||||
if (nextNeighborBelow) {
|
||||
if (
|
||||
(nextNeighborBelow && nextNeighborBelow.level >= nextLevel + 2) ||
|
||||
nextNeighborBelow.level >= nextLevel + 2 ||
|
||||
(nextNeighborBelow.level === nextLevel + 1 && nextNeighborBelow.filtered)
|
||||
) {
|
||||
let found = false;
|
||||
@ -767,6 +768,7 @@ export class SortingTreeComponent<T extends Identifiable & Displayable> implemen
|
||||
verticalMove = Direction.DOWNWARDS;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Handles the moving upwards
|
||||
if (verticalMove === Direction.UPWARDS) {
|
||||
|
Loading…
Reference in New Issue
Block a user