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.
|
// Check if the neighbor below has a level equals to two or more higher than the moved node.
|
||||||
|
if (nextNeighborBelow) {
|
||||||
if (
|
if (
|
||||||
(nextNeighborBelow && nextNeighborBelow.level >= nextLevel + 2) ||
|
nextNeighborBelow.level >= nextLevel + 2 ||
|
||||||
(nextNeighborBelow.level === nextLevel + 1 && nextNeighborBelow.filtered)
|
(nextNeighborBelow.level === nextLevel + 1 && nextNeighborBelow.filtered)
|
||||||
) {
|
) {
|
||||||
let found = false;
|
let found = false;
|
||||||
@ -767,6 +768,7 @@ export class SortingTreeComponent<T extends Identifiable & Displayable> implemen
|
|||||||
verticalMove = Direction.DOWNWARDS;
|
verticalMove = Direction.DOWNWARDS;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Handles the moving upwards
|
// Handles the moving upwards
|
||||||
if (verticalMove === Direction.UPWARDS) {
|
if (verticalMove === Direction.UPWARDS) {
|
||||||
|
Loading…
Reference in New Issue
Block a user