@netless/window-manager 0.4.17 → 0.4.18

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": "0.4.17",
3
+ "version": "0.4.18",
4
4
  "description": "",
5
5
  "main": "dist/index.es.js",
6
6
  "module": "dist/index.es.js",
package/src/AppProxy.ts CHANGED
@@ -346,7 +346,6 @@ export class AppProxy {
346
346
 
347
347
  public setViewFocusScenePath() {
348
348
  const fullPath = this.getFullScenePath();
349
- console.log("setViewFocusScenePath", this.kind, this.id, fullPath)
350
349
  if (fullPath && this.view) {
351
350
  setViewFocusScenePath(this.view, fullPath);
352
351
  }
@@ -381,7 +380,6 @@ export class AppProxy {
381
380
  if (cleanAttrs) {
382
381
  this.store.cleanAppAttributes(this.id);
383
382
  if (this.scenePath) {
384
- console.log("put closeApp", this.scenePath);
385
383
  removeScenes(this.manager.room, this.scenePath);
386
384
  }
387
385
  }
@@ -23,6 +23,7 @@ export class MainViewProxy {
23
23
  this.moveCameraSizeByAttributes();
24
24
  emitter.once("mainViewMounted").then(() => {
25
25
  setTimeout(() => {
26
+ this.addMainViewListener();
26
27
  this.start();
27
28
  if (!this.mainViewCamera || !this.mainViewSize) {
28
29
  this.setCameraAndSize();
@@ -54,7 +55,6 @@ export class MainViewProxy {
54
55
  public start() {
55
56
  if (this.started) return;
56
57
  this.sizeChangeHandler(this.mainViewSize);
57
- this.addMainViewListener();
58
58
  this.addCameraListener();
59
59
  this.manager.refresher?.add(Fields.MainViewCamera, this.cameraReaction);
60
60
  this.started = true;
@@ -116,9 +116,11 @@ export class MainViewProxy {
116
116
  const disableCameraTransform = this.mainView.disableCameraTransform;
117
117
  this.stop();
118
118
  this.mainView.release();
119
+ this.removeMainViewListener();
119
120
  this.mainView = this.createMainView();
120
121
  this.mainView.disableCameraTransform = disableCameraTransform;
121
122
  this.mainView.divElement = divElement;
123
+ this.addMainViewListener();
122
124
  this.start();
123
125
  }
124
126
 
@@ -204,7 +206,6 @@ export class MainViewProxy {
204
206
  }
205
207
 
206
208
  public stop() {
207
- this.removeMainViewListener();
208
209
  this.removeCameraListener();
209
210
  this.manager.refresher?.remove(Fields.MainViewCamera);
210
211
  this.manager.refresher?.remove(Fields.MainViewSize);
@@ -212,6 +213,7 @@ export class MainViewProxy {
212
213
  }
213
214
 
214
215
  public destroy() {
216
+ this.removeMainViewListener();
215
217
  this.stop();
216
218
  this.sideEffectManager.flushAll();
217
219
  }