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

gird view: resize child

上级 f59d7adb
......@@ -137,6 +137,10 @@ class BranchNode<T extends IView> extends AbstractNode {
return child;
}
resizeChild(index: number, size: number): void {
this.splitview.resizeView(index, size);
}
private onDidChildrenChange(): void {
const onDidChildrenChange = anyEvent(...this.children.map(c => c.onDidChange));
this._onDidChangeDisposable.dispose();
......@@ -249,7 +253,14 @@ export class GridView<T extends IView> implements IGrid<T> {
}
resizeView(location: number[], size: number): void {
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');
}
parent.resizeChild(index, size);
}
getViewSize(location: number[]): number {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册