@netless/window-manager 1.0.7-beta.0 → 1.0.7-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/App/AppProxy.ts +8 -0
package/package.json
CHANGED
package/src/App/AppProxy.ts
CHANGED
@@ -187,6 +187,11 @@ export class AppProxy implements PageRemoveService {
|
|
187
187
|
this.appEmitter.onAny(this.appListener);
|
188
188
|
this.appAttributesUpdateListener(appId);
|
189
189
|
this.setViewFocusScenePath();
|
190
|
+
// 如果当前是回放模式, 则需要记录当前主视图的场景路径, 以便在 app 创建后恢复
|
191
|
+
let currentMainViewScenePath: string | undefined;
|
192
|
+
if (this.manager.isReplay) {
|
193
|
+
currentMainViewScenePath = (this.manager.mainView as any).scenePath as string;
|
194
|
+
}
|
190
195
|
setTimeout(async () => {
|
191
196
|
// 延迟执行 setup, 防止初始化的属性没有更新成功
|
192
197
|
console.log("setup app", app);
|
@@ -195,6 +200,9 @@ export class AppProxy implements PageRemoveService {
|
|
195
200
|
appRegister.notifyApp(this.kind, "created", { appId, result });
|
196
201
|
this.afterSetupApp(boxInitState);
|
197
202
|
this.fixMobileSize();
|
203
|
+
if (currentMainViewScenePath) {
|
204
|
+
this.manager.mainViewProxy.setFocusScenePath(currentMainViewScenePath);
|
205
|
+
}
|
198
206
|
callbacks.emit("onAppSetup", appId);
|
199
207
|
}, SETUP_APP_DELAY);
|
200
208
|
});
|