提交 fcefb67a 编写于 作者: J Joao Moreno

fixes #67627

上级 66b8820e
......@@ -493,7 +493,7 @@ class TypeFilterController<T, TFilterData> implements IDisposable {
const element = focus[0];
if (this.tree.getRelativeTop(element) === null) {
this.tree.reveal(focus[0], 0.5);
this.tree.reveal(element, 0.5);
}
}
......@@ -1043,6 +1043,11 @@ export abstract class AbstractTree<T, TFilterData, TRef> implements IDisposable
reveal(location: TRef, relativeTop?: number): void {
const index = this.model.getListIndex(location);
if (index === -1) {
return null;
}
this.view.reveal(index, relativeTop);
}
......@@ -1052,6 +1057,11 @@ export abstract class AbstractTree<T, TFilterData, TRef> implements IDisposable
*/
getRelativeTop(location: TRef): number | null {
const index = this.model.getListIndex(location);
if (index === -1) {
return null;
}
return this.view.getRelativeTop(index);
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册