mirror of
https://github.com/Microsoft/vscode
synced 2024-08-27 13:00:58 +00:00
parent
2a5d8e21af
commit
6a36998bac
|
@ -250,6 +250,9 @@ class BranchNode implements ISplitView, IDisposable {
|
|||
const onDidSashReset = Event.map(this.splitview.onDidSashReset, i => [i]);
|
||||
this.splitviewSashResetDisposable = onDidSashReset(this._onDidSashReset.fire, this._onDidSashReset);
|
||||
|
||||
const onDidChildrenChange = Event.map(Event.any(...this.children.map(c => c.onDidChange)), () => undefined);
|
||||
this.childrenChangeDisposable = onDidChildrenChange(this._onDidChange.fire, this._onDidChange);
|
||||
|
||||
const onDidChildrenSashReset = Event.any(...this.children.map((c, i) => Event.map(c.onDidSashReset, location => [i, ...location])));
|
||||
this.childrenSashResetDisposable = onDidChildrenSashReset(this._onDidSashReset.fire, this._onDidSashReset);
|
||||
}
|
||||
|
|
|
@ -230,6 +230,9 @@ export class SplitView extends Disposable {
|
|||
private _onDidSashReset = this._register(new Emitter<number>());
|
||||
readonly onDidSashReset = this._onDidSashReset.event;
|
||||
|
||||
private _onDidChange = this._register(new Emitter<void>());
|
||||
readonly onDidChange = this._onDidChange.event;
|
||||
|
||||
get length(): number {
|
||||
return this.viewItems.length;
|
||||
}
|
||||
|
@ -561,6 +564,8 @@ export class SplitView extends Disposable {
|
|||
item.size = size;
|
||||
this.relayout([index], undefined);
|
||||
}
|
||||
|
||||
this._onDidChange.fire();
|
||||
}
|
||||
|
||||
resizeView(index: number, size: number): void {
|
||||
|
|
|
@ -787,7 +787,7 @@ export class EditorPart extends Part implements IEditorGroupsService, IEditorGro
|
|||
|
||||
readonly snap = true;
|
||||
|
||||
get onDidChange(): Event<IViewSize | undefined> { return this.centeredLayoutWidget.onDidChange; }
|
||||
get onDidChange(): Event<IViewSize | undefined> { return Event.any(this.centeredLayoutWidget.onDidChange, this.onDidSetGridWidget.event); }
|
||||
readonly priority: LayoutPriority = LayoutPriority.High;
|
||||
|
||||
private get gridSeparatorBorder(): Color {
|
||||
|
|
Loading…
Reference in a new issue