提交 70a0161f 编写于 作者: I isidor

center layout: hide sahses initialy until center layout gets activated

fixes #44866
上级 6f57929b
......@@ -1049,6 +1049,9 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
this.centeredEditorSashRight = new Sash(container.getHTMLElement(), this, { baseSize: 5, orientation: Orientation.VERTICAL });
registerSashListeners(this.centeredEditorSashLeft);
registerSashListeners(this.centeredEditorSashRight);
this.centeredEditorSashLeft.hide();
console.log('hiding');
this.centeredEditorSashRight.hide();
this.centeredEditorActive = false;
this.centeredEditorLeftMarginRatio = 0.5;
......@@ -2139,6 +2142,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
const id = this.visibleEditors[Position.ONE] ? this.visibleEditors[Position.ONE].getId() : undefined;
const doCentering = this.layoutVertically && this.stacks.groups.length === 1 && this.partService.isEditorLayoutCentered() && id !== PREFERENCES_EDITOR_ID && id !== TEXT_DIFF_EDITOR_ID;
if (doCentering && !this.centeredEditorActive) {
console.log('showing');
this.centeredEditorSashLeft.show();
this.centeredEditorSashRight.show();
......@@ -2147,6 +2151,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
this.resetCenteredEditor(false);
}
} else if (!doCentering && this.centeredEditorActive) {
console.log('hiding');
this.centeredEditorSashLeft.hide();
this.centeredEditorSashRight.hide();
}
......@@ -2154,6 +2159,7 @@ export class EditorGroupsControl extends Themable implements IEditorGroupsContro
this.silos[Position.ONE].setClass('centered', doCentering);
if (this.centeredEditorActive) {
console.log('layouting');
this.centeredEditorSashLeft.layout();
this.centeredEditorSashRight.layout();
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册