Merge pull request #4712 from MaximilianKrambach/fix4711
fix sorting tree condition #4711
This commit is contained in:
commit
6b25e62cec
@ -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