本文整理汇总了TypeScript中vs/workbench/browser/workbench.Workbench.layout方法的典型用法代码示例。如果您正苦于以下问题:TypeScript Workbench.layout方法的具体用法?TypeScript Workbench.layout怎么用?TypeScript Workbench.layout使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vs/workbench/browser/workbench.Workbench
的用法示例。
在下文中一共展示了Workbench.layout方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: onWindowResize
private onWindowResize(e: Event, retry: boolean): void {
if (e.target === window) {
if (window.document && window.document.body && window.document.body.clientWidth === 0) {
// TODO@Ben this is an electron issue on macOS when simple fullscreen is enabled
// where for some reason the window clientWidth is reported as 0 when switching
// between simple fullscreen and normal screen. In that case we schedule the layout
// call at the next animation frame once, in the hope that the dimensions are
// proper then.
if (retry) {
scheduleAtNextAnimationFrame(() => this.onWindowResize(e, false));
}
return;
}
this.workbench.layout();
}
}
示例2:
this._register(addDisposableListener(window, EventType.RESIZE, () => this.workbench.layout()));