@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@netless/window-manager",
3
- "version": "1.0.13-test.7",
3
+ "version": "1.0.13-test.9",
4
4
  "description": "Multi-window mode for Netless Whiteboard",
5
5
  "author": "l1shen <lishen1635@gmail.com> (https://github.com/l1shen)",
6
6
  "license": "MIT",
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
- console.log(`[window-manager] updateSizer ${JSON.stringify({ width, height })}`);
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