@netless/window-manager 0.4.67-beta.0 → 0.4.67
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/View/MainView.d.ts +1 -0
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +8 -4
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/View/MainView.ts +6 -1
package/package.json
CHANGED
package/src/View/MainView.ts
CHANGED
@@ -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) {
|