提交 2a65a6ff 编写于 作者: J Joao Moreno

fixes #37835

上级 3d88abfe
......@@ -655,13 +655,21 @@ export class TreeNavigator implements INavigator<Item> {
static lastDescendantOf(item: Item): Item {
if (!item) {
return null;
} else {
if (!(item instanceof RootItem) && (!item.isVisible() || !item.isExpanded() || item.lastChild === null)) {
return item;
} else {
return TreeNavigator.lastDescendantOf(item.lastChild);
}
}
if (item instanceof RootItem) {
return TreeNavigator.lastDescendantOf(item.lastChild);
}
if (!item.isVisible()) {
return TreeNavigator.lastDescendantOf(item.previous);
}
if (!item.isExpanded() || item.lastChild === null) {
return item;
}
return TreeNavigator.lastDescendantOf(item.lastChild);
}
constructor(item: Item, subTreeOnly: boolean = true) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册