@netless/window-manager 1.0.10-beta.1 → 1.0.10-beta.3

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "1.0.10-beta.1",
3
+ "version": "1.0.10-beta.3",
4
4
  "description": "Multi-window mode for Netless Whiteboard",
5
5
  "author": "l1shen <lishen1635@gmail.com> (https://github.com/l1shen)",
6
6
  "license": "MIT",
@@ -139,7 +139,7 @@ export class AppProxy implements PageRemoveService {
139
139
  this.manager.safeUpdateAttributes(["apps", this.id, Fields.FullPath], path);
140
140
  }
141
141
 
142
- public async baseInsertApp(skipUpdate = false): Promise<{ appId: string; app: NetlessApp }> {
142
+ public async baseInsertApp(skipUpdate = false, boxStatus: TeleBoxState = TELE_BOX_STATE.Normal): Promise<{ appId: string; app: NetlessApp }> {
143
143
  const params = this.params;
144
144
  if (!params.kind) {
145
145
  throw new Error("[WindowManager]: kind require");
@@ -153,7 +153,7 @@ export class AppProxy implements PageRemoveService {
153
153
  appImpl,
154
154
  params.options,
155
155
  appParams?.appOptions,
156
- this.manager.useBoxesStatus ? TELE_BOX_STATE.Normal : undefined,
156
+ this.manager.useBoxesStatus ? boxStatus : undefined,
157
157
  params.forceTop,
158
158
  params.forceNormal,
159
159
  params.isDragContent
@@ -282,16 +282,13 @@ export class AppProxy implements PageRemoveService {
282
282
  await this.destroy(true, false, true);
283
283
  return;
284
284
  }
285
- console.log('onReconnected====>', this.id);
286
285
  this.appEmitter.emit("reconnected", undefined);
287
286
  const currentAppState = this.getAppInitState(this.id);
288
- console.log('onReconnected====>0000', currentAppState?.boxStatus);
289
287
  await this.destroy(true, false, true);
290
288
  const params = this.params;
291
289
  const AppProxyClass = getExtendClass(AppProxy, WindowManager.extendClass);
292
290
  const appProxy = new AppProxyClass(params, this.manager, this.id, this.isAddApp);
293
- await appProxy.baseInsertApp(true);
294
- console.log('onReconnected====>', currentAppState?.boxStatus);
291
+ await appProxy.baseInsertApp(true, currentAppState?.boxStatus);
295
292
  this.boxManager?.updateBoxState(currentAppState);
296
293
  }
297
294
 
package/src/AppManager.ts CHANGED
@@ -467,7 +467,6 @@ export class AppManager {
467
467
  };
468
468
 
469
469
  private notifyBoxesStatusChange = debounce(() => {
470
- console.log('setBoxesStatus====>', this.attributes.boxesStatus);
471
470
  this.boxManager?.setBoxesStatus(this.attributes.boxesStatus);
472
471
  const entries = Object.entries(this.attributes.boxesStatus);
473
472
  if (entries.length > 0) {
@@ -485,7 +484,6 @@ export class AppManager {
485
484
  return safeListenPropsUpdated(
486
485
  () => this.attributes.boxesStatus,
487
486
  () => {
488
- console.log('setBoxesStatus====>000', this.attributes.boxesStatus);
489
487
  this.notifyBoxesStatusChange();
490
488
  }
491
489
  );