@netless/window-manager 1.0.13-test.7 → 1.0.13-test.9
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 +3 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +5 -3
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
- package/src/BoxManager.ts +1 -0
- package/src/ContainerResizeObserver.ts +3 -2
package/package.json
CHANGED
package/src/BoxManager.ts
CHANGED
|
@@ -420,6 +420,7 @@ export class BoxManager {
|
|
|
420
420
|
const rect = this.mainView.divElement?.getBoundingClientRect();
|
|
421
421
|
if (rect && rect.width > 0 && rect.height > 0) {
|
|
422
422
|
const containerRect = { x: 0, y: 0, width: rect.width, height: rect.height };
|
|
423
|
+
console.log("[window-manager] updateManagerRect" + JSON.stringify(containerRect) + "mainView" + this.mainView.size);
|
|
423
424
|
this.teleBoxManager.setContainerRect(containerRect);
|
|
424
425
|
this.context.notifyContainerRectUpdate(this.teleBoxManager.containerRect);
|
|
425
426
|
}
|
|
@@ -28,7 +28,7 @@ export class ContainerResizeObserver {
|
|
|
28
28
|
sizer: HTMLElement,
|
|
29
29
|
wrapper: HTMLDivElement
|
|
30
30
|
) {
|
|
31
|
-
console.log(`[window-manager] observePlaygroundSize ${container.getBoundingClientRect(), sizer.getBoundingClientRect(), wrapper.getBoundingClientRect()}`);
|
|
31
|
+
console.log(`[window-manager] observePlaygroundSize ${JSON.stringify(container.getBoundingClientRect())}, ${JSON.stringify(sizer.getBoundingClientRect())}, ${JSON.stringify(wrapper.getBoundingClientRect())}`);
|
|
32
32
|
this.updateSizer(container.getBoundingClientRect(), sizer, wrapper);
|
|
33
33
|
|
|
34
34
|
this.containerResizeObserver = new ResizeObserver(entries => {
|
|
@@ -65,7 +65,8 @@ export class ContainerResizeObserver {
|
|
|
65
65
|
}
|
|
66
66
|
wrapper.style.width = `${width}px`;
|
|
67
67
|
wrapper.style.height = `${height}px`;
|
|
68
|
-
|
|
68
|
+
wrapper.style.backgroundColor = 'green';
|
|
69
|
+
console.log(`[window-manager] updateSizer ${JSON.stringify({ width, height })} ${wrapper.style.width} ${wrapper.style.height} ${JSON.stringify(wrapper.getBoundingClientRect())}`);
|
|
69
70
|
}
|
|
70
71
|
}
|
|
71
72
|
|