提交 709c24be 编写于 作者: J Joao Moreno

splitview: expose minimum and maximum size

上级 36f65bd2
......@@ -104,11 +104,11 @@ class BranchNode implements ISplitView, IDisposable {
}
get minimumOrthogonalSize(): number {
return this.children.length === 0 ? 0 : this.children.reduce((r, c) => r + c.minimumSize, 0);
return this.splitview.minimumSize;
}
get maximumOrthogonalSize(): number {
return this.children.length === 0 ? Number.POSITIVE_INFINITY : this.children.reduce((r, c) => r + c.maximumSize, 0);
return this.splitview.maximumSize;
}
get minimumWidth(): number {
......
......@@ -146,6 +146,14 @@ export class SplitView implements IDisposable {
return this.viewItems.length;
}
get minimumSize(): number {
return this.viewItems.reduce((r, item) => r + item.view.minimumSize, 0);
}
get maximumSize(): number {
return this.length === 0 ? Number.POSITIVE_INFINITY : this.viewItems.reduce((r, item) => r + item.view.maximumSize, 0);
}
private _orthogonalStartSash: Sash | undefined;
get orthogonalStartSash(): Sash | undefined { return this._orthogonalStartSash; }
set orthogonalStartSash(sash: Sash | undefined) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册