@netless/window-manager 0.4.67-beta.0 → 0.4.67-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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "0.4.67-beta.0",
3
+ "version": "0.4.67-beta.1",
4
4
  "description": "Multi-window mode for Netless Whiteboard",
5
5
  "author": "l1shen <lishen1635@gmail.com> (https://github.com/l1shen)",
6
6
  "license": "MIT",
@@ -120,6 +120,7 @@ export class MainViewProxy {
120
120
  this.moveCameraToContian(size);
121
121
  this.moveCamera(this.mainViewCamera);
122
122
  }
123
+ this.ensureMainViewSize();
123
124
  }, 30);
124
125
 
125
126
  public onUpdateContainerSizeRatio = () => {
@@ -234,11 +235,15 @@ export class MainViewProxy {
234
235
  clearTimeout(this._syncMainViewTimer);
235
236
  this._syncMainViewTimer = setTimeout(this.syncMainView, 100, this.manager.room);
236
237
  }
238
+ this.ensureMainViewSize();
239
+ };
240
+
241
+ private ensureMainViewSize() {
237
242
  if ((!this.mainViewSize || this.mainViewSize.width === 0 || this.mainViewSize.height === 0) &&
238
243
  this.mainView.size.width > 0 && this.mainView.size.height > 0) {
239
244
  this.setMainViewSize(this.mainView.size);
240
245
  }
241
- };
246
+ }
242
247
 
243
248
  private syncMainView = (room: Room) => {
244
249
  if (room.isWritable) {