Fixes showing the arrow to expand.

This commit is contained in:
GabrielMeyer 2019-04-23 16:35:41 +02:00
parent d0c6fd1dd1
commit c87c41ac56

View File

@ -708,7 +708,7 @@ export class SortingTreeComponent<T extends Identifiable & Displayable> implemen
if (node.level > 0) { if (node.level > 0) {
// const previousNode = this.osTreeData[previousIndex - 1]; // const previousNode = this.osTreeData[previousIndex - 1];
const previousNode = this.getNextVisibleNode(this.osTreeData[previousIndex - 1], Direction.UPWARDS); const previousNode = this.getNextVisibleNode(this.osTreeData[previousIndex - 1], Direction.UPWARDS);
const onlyChild = this.getChildNodes(previousNode).length === 1; const onlyChild = this.getUnfilteredChildNodes(previousNode).length === 1;
const isMovedLowerLevel = previousIndex === nextIndex && nextLevel <= previousNode.level && onlyChild; const isMovedLowerLevel = previousIndex === nextIndex && nextLevel <= previousNode.level && onlyChild;
const isMovedAway = previousIndex !== nextIndex && onlyChild; const isMovedAway = previousIndex !== nextIndex && onlyChild;