@netless/window-manager 1.0.13-test.5 → 1.0.13-test.6
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 +1 -1
- package/src/ContainerResizeObserver.ts +3 -1
- package/src/View/MainView.ts +3 -1
- package/src/index.ts +1 -0
package/package.json
CHANGED
|
@@ -35,13 +35,14 @@ export class ContainerResizeObserver {
|
|
|
35
35
|
const containerRect = entries[0]?.contentRect;
|
|
36
36
|
if (containerRect) {
|
|
37
37
|
this.updateSizer(containerRect, sizer, wrapper);
|
|
38
|
-
console.log(`[window-manager] containerResizeObserver ${containerRect}`);
|
|
38
|
+
console.log(`[window-manager] containerResizeObserver ${JSON.stringify(containerRect)}`);
|
|
39
39
|
this.emitter.emit("playgroundSizeChange", containerRect);
|
|
40
40
|
}
|
|
41
41
|
});
|
|
42
42
|
|
|
43
43
|
this.disposer = this.emitter.on("containerSizeRatioUpdate", () => {
|
|
44
44
|
const containerRect = container.getBoundingClientRect();
|
|
45
|
+
console.log(`[window-manager] containerSizeRatioUpdate ${JSON.stringify(containerRect)}`);
|
|
45
46
|
this.updateSizer(containerRect, sizer, wrapper);
|
|
46
47
|
this.emitter.emit("playgroundSizeChange", containerRect);
|
|
47
48
|
});
|
|
@@ -64,6 +65,7 @@ export class ContainerResizeObserver {
|
|
|
64
65
|
}
|
|
65
66
|
wrapper.style.width = `${width}px`;
|
|
66
67
|
wrapper.style.height = `${height}px`;
|
|
68
|
+
console.log(`[window-manager] updateSizer ${JSON.stringify({ width, height })}`);
|
|
67
69
|
}
|
|
68
70
|
}
|
|
69
71
|
|
package/src/View/MainView.ts
CHANGED
|
@@ -38,6 +38,8 @@ export class MainViewProxy {
|
|
|
38
38
|
});
|
|
39
39
|
const playgroundSizeChangeListener = () => {
|
|
40
40
|
this.playgroundSizeChangeListenerLocalConsole.log(
|
|
41
|
+
JSON.stringify(this.mainView.camera),
|
|
42
|
+
JSON.stringify(this.mainView.size),
|
|
41
43
|
JSON.stringify(this.mainViewSize),
|
|
42
44
|
JSON.stringify(this.mainViewCamera),
|
|
43
45
|
window.outerHeight, window.outerWidth,
|
|
@@ -108,7 +110,7 @@ export class MainViewProxy {
|
|
|
108
110
|
}
|
|
109
111
|
|
|
110
112
|
public start() {
|
|
111
|
-
console.log("[window-manager] start "
|
|
113
|
+
console.log("[window-manager] start " + JSON.stringify(this.mainViewSize));
|
|
112
114
|
this.sizeChangeHandler(this.mainViewSize);
|
|
113
115
|
if (this.started) return;
|
|
114
116
|
this.addCameraListener();
|
package/src/index.ts
CHANGED
|
@@ -1047,6 +1047,7 @@ export class WindowManager
|
|
|
1047
1047
|
animationMode?: AnimationMode;
|
|
1048
1048
|
}>
|
|
1049
1049
|
): void {
|
|
1050
|
+
console.log("[window-manager] moveCameraToContain" + JSON.stringify(rectangle));
|
|
1050
1051
|
this.mainView.moveCameraToContain(rectangle);
|
|
1051
1052
|
setTimeout(() => {
|
|
1052
1053
|
this.appManager?.mainViewProxy.setCameraAndSize();
|