feat(workspace): fix onWindowRendererReady api

This commit is contained in:
liujuping 2023-09-04 11:51:18 +08:00 committed by 林熠
parent 2c2241ef73
commit bfdc7a277b
2 changed files with 5 additions and 4 deletions

View File

@ -49,7 +49,7 @@ export class Workbench extends Component<{
<SkeletonContext.Provider value={skeleton}> <SkeletonContext.Provider value={skeleton}>
<TopArea area={skeleton.topArea} itemClassName={topAreaItemClassName} /> <TopArea area={skeleton.topArea} itemClassName={topAreaItemClassName} />
<div className="lc-workspace-workbench-body"> <div className="lc-workspace-workbench-body">
<LeftArea className="lc-workspace-left-area" area={skeleton.leftArea} /> <LeftArea className="lc-workspace-left-area lc-left-area" area={skeleton.leftArea} />
<LeftFloatPane area={skeleton.leftFloatArea} /> <LeftFloatPane area={skeleton.leftFloatArea} />
<LeftFixedPane area={skeleton.leftFixedArea} /> <LeftFixedPane area={skeleton.leftFixedArea} />
<div className="lc-workspace-workbench-center"> <div className="lc-workspace-workbench-center">

View File

@ -126,9 +126,10 @@ export class EditorWindow implements IEditorWindow {
async init() { async init() {
await this.initViewTypes(); await this.initViewTypes();
await this.execViewTypesInit(); await this.execViewTypesInit();
Promise.all(Array.from(this.editorViews.values()).map((d) => d.onSimulatorRendererReady)).then(() => { Promise.all(Array.from(this.editorViews.values()).map((d) => d.onSimulatorRendererReady()))
this.workspace.emitWindowRendererReady(); .then(() => {
}); this.workspace.emitWindowRendererReady();
});
this.url = await this.resource.url(); this.url = await this.resource.url();
this.setDefaultViewName(); this.setDefaultViewName();
this.initReady = true; this.initReady = true;