提交 fda87c90 编写于 作者: J Johannes Rieken

allow to relayout a zone, #11407

上级 902c1ddc
......@@ -294,6 +294,15 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider {
// implement in subclass
}
protected _relayout(newHeightInLines: number): void {
if (this._viewZone.heightInLines !== newHeightInLines) {
this.editor.changeViewZones(accessor => {
this._viewZone.heightInLines = newHeightInLines;
accessor.layoutZone(this._viewZone.id);
});
}
}
// --- sash
private _initSash(): void{
......@@ -325,10 +334,7 @@ export abstract class ZoneWidget implements IHorizontalSashLayoutProvider {
let newHeightInLines = data.heightInLines + roundedLineDelta;
if (newHeightInLines > 5 && newHeightInLines < 35) {
this.editor.changeViewZones(accessor => {
this._viewZone.heightInLines = newHeightInLines;
accessor.layoutZone(this._viewZone.id);
});
this._relayout(newHeightInLines);
}
}
}));
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册