@netless/window-manager 0.4.63 → 0.4.65-beta.0
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 +5 -1
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/View/MainView.ts +7 -5
package/package.json
CHANGED
package/src/View/MainView.ts
CHANGED
@@ -53,9 +53,10 @@ export class MainViewProxy {
|
|
53
53
|
if (isWritable) {
|
54
54
|
this.ensureCameraAndSize();
|
55
55
|
}
|
56
|
+
if (this.manager.room) this.syncMainView(this.manager.room);
|
56
57
|
});
|
57
58
|
});
|
58
|
-
}
|
59
|
+
};
|
59
60
|
|
60
61
|
public ensureCameraAndSize() {
|
61
62
|
if (this.viewMode !== ViewMode.Broadcaster) return;
|
@@ -87,6 +88,7 @@ export class MainViewProxy {
|
|
87
88
|
if (this.started) return;
|
88
89
|
this.addCameraListener();
|
89
90
|
this.addCameraReaction();
|
91
|
+
if (this.manager.room) this.syncMainView(this.manager.room);
|
90
92
|
this.started = true;
|
91
93
|
}
|
92
94
|
|
@@ -123,7 +125,7 @@ export class MainViewProxy {
|
|
123
125
|
public onUpdateContainerSizeRatio = () => {
|
124
126
|
const size = this.store.getMainViewSize();
|
125
127
|
this.sizeChangeHandler(size);
|
126
|
-
}
|
128
|
+
};
|
127
129
|
|
128
130
|
public get view(): View {
|
129
131
|
return this.mainView;
|
@@ -238,7 +240,7 @@ export class MainViewProxy {
|
|
238
240
|
if (room.isWritable) {
|
239
241
|
room.syncMainView(this.mainView);
|
240
242
|
}
|
241
|
-
}
|
243
|
+
};
|
242
244
|
|
243
245
|
public moveCameraToContian(size: Size): void {
|
244
246
|
if (!isEmpty(size)) {
|
@@ -274,9 +276,9 @@ export class MainViewProxy {
|
|
274
276
|
this.started = false;
|
275
277
|
}
|
276
278
|
|
277
|
-
public setViewMode = (mode:ViewMode) => {
|
279
|
+
public setViewMode = (mode: ViewMode) => {
|
278
280
|
this.viewMode = mode;
|
279
|
-
}
|
281
|
+
};
|
280
282
|
|
281
283
|
public destroy() {
|
282
284
|
this.removeMainViewListener();
|