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

gridview: getViewSize

上级 8d752f32
......@@ -147,6 +147,10 @@ class BranchNode<T extends IView> extends AbstractNode {
this.splitview.resizeView(index, size);
}
getChildSize(index: number): number {
return this.splitview.getViewSize(index);
}
private onDidChildrenChange(): void {
const onDidChildrenChange = anyEvent(...this.children.map(c => c.onDidChange));
this.onDidChangeDisposable.dispose();
......@@ -260,7 +264,14 @@ export class GridView<T extends IView> implements IGrid<T>, IDisposable {
}
getViewSize(location: number[]): number {
throw new Error('Method not implemented.');
const [rest, index] = tail(location);
const [, parent] = this.getNode(rest);
if (!(parent instanceof BranchNode)) {
throw new Error('Invalid location');
}
return parent.getChildSize(index);
}
getViews(): IBranchNode<T> {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册