提交 088b2103 编写于 作者: J Johannes Rieken

properly layout tree

上级 661c741c
......@@ -52,6 +52,7 @@ export class OutlinePane extends ViewPane {
private _progressBar!: ProgressBar;
private _treeContainer!: HTMLElement;
private _tree?: WorkbenchDataTree<IOutline<any>, any, FuzzyScore>;
private _treeDimensions?: dom.Dimension;
private _treeStates = new LRUCache<string, IDataTreeViewState>(10);
private readonly _ctxFocused: IContextKey<boolean>;
......@@ -137,6 +138,7 @@ export class OutlinePane extends ViewPane {
protected layoutBody(height: number, width: number): void {
super.layoutBody(height, width);
this._tree?.layout(height, width);
this._treeDimensions = new dom.Dimension(width, height);
}
collapseAll(): void {
......@@ -294,6 +296,7 @@ export class OutlinePane extends ViewPane {
}));
// last: set tree property
tree.layout(this._treeDimensions?.height, this._treeDimensions?.width);
this._tree = tree;
this._editorDisposables.add(toDisposable(() => {
tree.dispose();
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册